Expand my Community achievements bar.

Radically easy to access on brand approved content for distribution and omnichannel performant delivery. AEM Assets Content Hub and Dynamic Media with OpenAPI capabilities is now GA.

null MessageBroker


Former Community Member

My application needs server push.  I am trying to get a simple "Hello World" going, but I can't get past a null MessageBroker.  I simplified my configuration files and it might be my issue.

My services-config.xml

includes only the messaging and data-management configs:

<service-include file-path="messaging-config.xml"/>
<service-include file-path="data-management-config.xml"/>


   <channel ref="my_rtmp"/>
   <channel ref="my_amf"/>
   <channel ref="my_polling-amf"/>

a single server

<server id="my-nio-server" class="flex.messaging.socketserver.SocketServer">

and i left the channel definitions as defined.

My messaging-config.xml is:

<service id="message-service" class="flex.messaging.services.MessageService">
    <adapter-definition id="actionscript" class="flex.messaging.services.messaging.adapters.ActionScriptAdapter" default="false"/>
  <destination id="DocumentSessionTopic">
       <channel ref="my_amf"/>
       <channel ref="my_polling-amf"/>

My java part is:

MessageBroker msgBroker;
msgBroker = MessageBroker.getMessageBroker(null);

msgBroker is null when I try to invoke its start() method.

Thanks in advance.

1 Reply



What context is your Java code being executed in?

You need to be in the same web application as LCDS, so the MessageBrokerServlet will have created and registered the MessageBroker in the static table.  I assume also that you have not defined an identifier in the web.xml for the MessageBroker so the null argument to the get function should find the default instance (named "__default_").

You can take a look at the MessageBroker code in svn here: http://opensource.adobe.com/svn/opensource/blazeds/trunk/modules/core/src/flex/messaging/