8 Replies Latest reply on Mar 31, 2008 2:41 PM by mdonato

    haSingleton JMS + cluster (publisher node receiving its mess

    mdonato

      Hi All,

      Env.: Jboss-4.0.2 in cluster with haSingleton

      Is there a way to the node who publish the message do not receive it ?

      Thanks

        • 1. Re: haSingleton JMS + cluster (publisher node receiving its

          Set "noLocal" to true when you create the TopicSubscriber.

          • 2. Re: haSingleton JMS + cluster (publisher node receiving its
            mdonato

            Thanks a lot, i'll make a test, what about QUEUE, is the same ???

            • 3. Re: haSingleton JMS + cluster (publisher node receiving its
              mdonato

              Where i'll set noLocal ??? programatic or descritor ??? Subscriber or publisher ????

              • 4. Re: haSingleton JMS + cluster (publisher node receiving its
                mdonato

                Hi ... I found this "noLocal" option on method createDurableSubscriber for TopicSession interface ... but i use MessageDrivenBean .. where i have one for topic and other for queue ....

                Is there a way to my MessageDivenBeans do not receive the message sent by the same server ?

                I have my application in cluster ... is the same application for both nodes ... so .. one node will sent a message .. .and this node .. may not receive it ... for the topic MDB others nodes should receive ... for queue MDB only one of other (not same) node may receive.

                Anyone can help ?

                tks in advice

                • 5. Re: haSingleton JMS + cluster (publisher node receiving its

                   

                  "mdonato" wrote:

                  Is there a way to my MessageDivenBeans do not receive the message sent by the same server ?


                  MDBs don't use the same connection for receiving and sending so no.

                  • 6. Re: haSingleton JMS + cluster (publisher node receiving its
                    mdonato

                    So i have big problem,

                    I have an application that willl run in 2 servers ... the same application !!

                    My application has an SessionBean that send messages to JMS, and have 2 MDB's that receive messages, one for queue and other for topic.

                    But when the message was sent to "topic", for now, it's ok to be delivered to all those servers, including it self, but, when the message was sent to "queue", the server who sent that message should not receive it, only one of the other's servers may receive.

                    I think that JMS was designed to sent messages to other's servers or applications, but not to it self!

                    Is there a workaround ??



                    • 7. Re: haSingleton JMS + cluster (publisher node receiving its

                       

                      "mdonato" wrote:

                      But when the message was sent to "topic", for now, it's ok to be delivered to all those servers, including it self, but, when the message was sent to "queue", the server who sent that message should not receive it, only one of the other's servers may receive.


                      That's not defined in the spec. In fact, a jms server doesn't even have to support
                      two receivers on the same queue.

                      What you are doing won't work anyway unless the messages are
                      non-persistent. The "noLocal" is a check for is it the same connection,
                      NOT is the same client computer.

                      WIth an MDB (or any other receiver of persistent messages) it can reconnect
                      (e.g. due to a failure) and the "noLocal" won't work because it is no longer the
                      same connection.


                      I think that JMS was designed to sent messages to other's servers or applications, but not to it self!

                      Is there a workaround ??


                      Only to put a property in the message and use a selector to say I don't
                      want messages where the property equals the one that I'm setting in my sends.
                      But then you have to think about how you persist that value across failures.

                      Basically a more durable version of "noLocal".


                      • 8. Re: haSingleton JMS + cluster (publisher node receiving its
                        mdonato

                        So,

                        If i set a flag on my application, end test it on MDB, is there a way to make a message be redelivered to other's client, like an exception?

                        Note.: Same application on both servers.

                        Or if i can set a message selector for an MDB in runtime, is there a way to do this ?

                        Or if i set an property on my message, and based on this, i make my MDB forward message to other server !

                        I need a solution, and i need urgent help.

                        Any ideas ?