4 Replies Latest reply on Aug 1, 2002 9:35 PM by schaefera

    Remote Topic Non-MDB

    jweis

      The functionality I would like using Topics and Subscribers is:


      On Server 'A' some java object (not an EJB or MDB) creates a message and stores it locally until it has been acknowledged. Server 'A' object then attempts to publish message to a Topic on Server 'B'. Object on server 'B' is listening via onMessage() method.

      Here is how I am accomplishing this right now:

      Object on Server 'A' is publishing messages to a Topic that resides on Server 'A' (a local Topic on same server). Object on Server 'B' looks up TopicConnectionFactory via Server 'A's JNDI service. Then Object on Server 'B' is actually listening / subscribing to the Topic on Server 'A'.

      Here is the question:

      Is this a good way to accomplish remote messaging and listening? It feels not quite right to me? If it can be done better, how in JBOSS 3.0?

        • 1. Re: Remote Topic Non-MDB
          joelvogt

          Yes it is a good way, why doesn't it feel right to you?

          • 2. Re: Remote Topic Non-MDB
            schaefera

            In JBossMQ there is now notion where a client must be (except for an MDB) so a client (consumer or publisher can be local or remote). The Connection/Session take care of how the message are aknowledged even when they are remote.
            So your client on Server 'A' could even be a remote client on Server 'C'.

            Have fun - Andy

            • 3. Re: Remote Topic Non-MDB
              jweis

              I guess the idea of "Messaging" to me seemed most natural in the form of sending a message from point A to point B and point B was waiting (listening) to receive. A remote listener did not seem as natural, but I am glad to see that this design is not a bad one necessarily. Thanks for the speedy reply.

              • 4. Re: Remote Topic Non-MDB
                schaefera

                The idea of messaging is that a message producer on Box A sends a message to a JMS server on (another) Box B which then sends the message to one or more message consumers on a Box C.

                Where the boxes are doesn't matter as long as any client can connect to the JMS server.

                Andy