Package org.wso2.carbon.cloud.csg.agent

Examples of org.wso2.carbon.cloud.csg.agent.CSGServicePublisher.publish()


                }

                SuperTenantCarbonContext.getCurrentContext().setTenantId(tenantId);
                SuperTenantCarbonContext.getCurrentContext().getTenantDomain(true);

                broker.publish(message, MDPublisherConstants.BAM_REG_PATH);

            } catch (EventBrokerException e) {
                log.error("Can not publish the message ", e);
            } finally {
                SuperTenantCarbonContext.endTenantFlow();
View Full Code Here


                SuperTenantCarbonContext.startTenantFlow();
                int tenantId = SuperTenantCarbonContext.getCurrentContext(PublisherUtils.getConfigurationContext()).getTenantId();
                SuperTenantCarbonContext.getCurrentContext().setTenantId(tenantId);
                SuperTenantCarbonContext.getCurrentContext().getTenantDomain(true);

                broker.publish(message, ActivityPublisherConstants.BAM_REG_PATH);

            } catch (EventBrokerException e) {
                log.error("Can not publish the message ", e);
            } finally {
                SuperTenantCarbonContext.endTenantFlow();
View Full Code Here

                        mc.getConfigurationContext()).getTenantId();
                try {
                    SuperTenantCarbonContext.startTenantFlow();
                    SuperTenantCarbonContext.getCurrentContext().setTenantId(tenantID);
                    SuperTenantCarbonContext.getCurrentContext().getTenantDomain(true);
                    broker.publish(message, topicValue);
                } catch (EventBrokerException e) {
                    handleException("Error publishing the event to the broker", e, synCtx);
                } catch (Exception e) {
                    log.error("Error in setting tenant information", e);
                } finally {
View Full Code Here

            if (eventBroker == null) {
              throw new DataServiceFault("Event broker instance is not available");
            }
            Message message = new Message();
            message.setMessage(omMessage);
            eventBroker.publish(message, topic);
        } catch (Exception e) {
          throw new DataServiceFault(e, "Error in publishing event for topic: " +
                    topic + " message:-\n" + omMessage);
        }
    }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.