Uploaded image for project: 'AMQ Broker'
  1. AMQ Broker
  2. ENTMQBR-3235

Good practices for producing messages to the AMQ Broker

    XMLWordPrintable

Details

    • Story
    • Resolution: Unresolved
    • Minor
    • None
    • None
    • None
    • None
    • Documentation (Ref Guide, User Guide, etc.)

    Description

      Hi,

      Below are a few good practices while producing messages to AMQ cluster using Java code deployed in EAP.

      1. It is always recommended to using JNDI connection while making connection to the AMQ broker.
      2. In the EAP, create a pooled connection factory and create a JNDI against it. This JNDI can then be used in the application to make connection to the AMQ broker cluster.
      3. The JNDI connection should be used in a stateless java bean.
      4. When the bean is instantiated as an EJB, the EAP takes care of the lifecycle of the bean.
      5. This helps to distribute the load of messages amongst the brokers depending on the number of messages that are being sent and the frequency of the messages.

      Basically, this setup allows EAP to manage all the connections to AMQ.

      Sample application using the recommended practices: link AMQ Java Producer

      Attachments

        Activity

          People

            jcliffor@redhat.com John Clifford
            rhn-support-shchavan Shrikant Chavan (Inactive)
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated: