Results 1 to 3 of 3

Thread: Flex messaging 'Consumer' in Java

  1. #1
    Join Date
    May 2008
    Location
    Silicon Valley, CA
    Posts
    139

    Question Flex messaging 'Consumer' in Java

    I've found examples of sending messages from Java,
    and getting RPC (remoting) calls into Java,
    But haven't found much to show how to receive messages in the Java server.
    That is, have a Java object/service subscribe to the messages.

    Can someone point to some examples or documentation for this?

    Can it be done with BlazeDS messaging?
    Does it require JMS or Spring Integration?

  2. #2
    Join Date
    Apr 2005
    Location
    San Francisco, CA
    Posts
    1,224

    Default

    Yes, you need to use either JMS or Spring Integration for that. If you don't have specific requirements for using JMS, I would recommend using Spring Integration.

    There is an example in the Test Drive. I believe it's referred to as the "POJO Messaging" sample in the Test Drive guide.
    Jeremy Grelle

    Staff Engineer, Web Products Team
    SpringSource

  3. #3

    Default BlazeDS Messaging

    If you have Flex clients using Producers, you can also use a custom MessageAdapter.

    Code:
      <bean id="queryMessageAdapter"
            class="FlexDatasourceAdapter">
        <property name="datasourceService"
                  ref="datasourceService"/>
      </bean>
    
      <flex:message-destination id="query-bus"
    	                          message-broker="appMessageBroker"
    	                          channels="appAMFStreamChannel,appAMFSecureStreamChannel"
                                service-adapter="queryMessageAdapter"
                               	allow-subtopics="true"
                              	cluster-message-routing="broadcast"
    	                          message-time-to-live="0"
    	                          subscription-timeout-minutes="0"
    	                          subtopic-separator="."
    	                          throttle-inbound-max-frequency="500"
    	                          throttle-inbound-policy="ERROR"
    	                          throttle-outbound-max-frequency="500"
    	                          throttle-outbound-policy="IGNORE" />

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •