9 Replies Latest reply on Jun 2, 2004 8:22 AM by adrian.brock

    HAJMS and Message Driven Beans - Expected behaviour

    byteflower

      Hi there!

      I have a JBossMQ newbie question, that I hope you guys could help me with.

      I'am running Jboss 3.2.3 in a project. I will have a cluster - Node A and Node B. HAJMS will be configured, and a topic X will be subscibed to by an MDB that has been deployed on both node A and node B.

      My question is simple(maybee even stupid):

      - Does the current JBossMQ HA implementation guarantee that both my deployed MDB's will get a message from topic X when a message is published to that topic?

      I assume that answer to my question is YES, but I have seen a lots of different issues concerning HAJMS, so could you please help me - are there any shortcommings in the current relase that will force me to rethink my design later....when I have had the time to test?

      Many thanks in advance!

        • 1. Re: HAJMS and Message Driven Beans - Expected behaviour

          This very topic was discussed yesterday.

          Guaranteed delivery (keeping permenant copies) has nothing to do with HA
          (that the server should be 99.99x% available).

          • 2. Re: HAJMS and Message Driven Beans - Expected behaviour
            byteflower

            Hi Adrian!

            Thanks for your quick response... and many other helping hints in the right direction within this forum.

            My question was probably a bit vague - To put it in another wording:

            Doe's each deployed MDB, that subscribes to the same topic, receive a message when a publisher have posted to the topic(client runs in either Node A or Node B). (given perfect conditions, i.e. no disturbance of cluster). In theory this would be the case, just want to make sure I wouldn't stumble over some odd behaviour because of the HAJMS config.

            Once again - Thank's for keeping up with the good support - responding to my newbie questions!

            • 3. Re: HAJMS and Message Driven Beans - Expected behaviour

              In the "READ THIS FIRST" you will find a link to the WIKI that contains a definition
              of guaranteed delivery. I repeat HA has nothing to do with it. That is about connectivity
              not delivery.

              Claiming you're a newbie does not excuse you from one my petulant rants :-)

              Here is the discussion you seem incapable of finding. It is currently on the same
              page as your question:
              http://www.jboss.org/index.html?module=bb&op=viewtopic&t=48909

              • 4. Re: HAJMS and Message Driven Beans - Expected behaviour
                byteflower

                Hi Adrian - I have already browsed the mentioned post, but guaranteed delivery is not my problem.(that would be solved by Durable topic)

                My problem - Now I had the time to test - is as follows:

                My topic, myTopic, does not seem to be visible from both nodes, i.e. the MDB on node A do get the message, but the MDB on node B do NOT get the message.

                From a client perspective, in this case running on node A, I follow your adwise and use the "HAILXAConnectionFactory" - see client code:

                //Setup connection...
                InitialContext iniCtx = new InitialContext();
                Object tmp = iniCtx.lookup("HAILXAConnectionFactory");
                TopicConnectionFactory tcf = (TopicConnectionFactory) tmp;
                durTopicConn = tcf.createTopicConnection();
                durTopicConn.setExceptionListener(this);
                topic = (Topic) iniCtx.lookup("myTopic");
                session = durTopicConn.createTopicSession(false, TopicSession.AUTO_ACKNOWLEDGE);
                durTopicConn.start();
                
                //Publish the message
                TopicPublisher send = session.createPublisher(topic);
                ObjectMessage msg = session.createObjectMessage(rcnot);
                send.publish(msg);
                


                So, given the exceution of this code...I hope to have a message on myTopic, whereby each MDB(one on node A and one on node B) receives my posted message.

                Do you have a clue on why I only receive a message on node A?

                I have pre-defined the topic in jbossmq-destinations-service.xml and followed all other advices in: http://www.cocoonhive.org/articles/jboss/20031125/JBoss32-hajms.html. But something is missing :-(

                How does the MDB know that we are using a HAJMS, when connectiong from client I use HAILXAConnectionFactory, so that is no magic, but how do you configure the MDB/container to understand this....my assumption is that the MDB in my case seems to create a "local" topic...?

                If you solve this...You have plenty free beer to collect when visiting Gothenburg, Sweden - next time! ;-)

                Many Thanks in advance!





                • 5. Re: HAJMS and Message Driven Beans - Expected behaviour

                  Look.

                  If you read "READ THIS FIRST" you would know what information is required
                  to help us help you.

                  If you read the "FAQ" you would know how to configure an MDB's connection factory.

                  If you had used search you would know HAIL does not work from a client. i.e.
                  outside a machine in the JBoss cluster.

                  I have little or no interest in HAIL, it was experimental in 3.2.3 and is not used in 3.2.4

                  > Do you have a clue on why I only receive a message on node A?

                  No I do not, all you have posted is that "IT DOES NOT WORK".

                  I am not going to play 20 questions. If you want help, show:
                  1) The *relevent* configuration changes you made
                  2) The configuration for the MDBs
                  3) A debug log for when it doesn't work (error message if you have one).
                  4) That you have some idea you know what you are doing, present it logically step by step

                  It seems no matter how many times I shout at people, you never get it.
                  Have any of you actually supported any software
                  or are you just dillettente programmers that never get involved with handling
                  client/customer problems?

                  • 6. Re: HAJMS and Message Driven Beans - Expected behaviour
                    mredeker

                    Adrian,

                    if all JBoss Inc. employees treat their customes like you I do not see a future!
                    And since we just signed up for the JASP I am interested IN A FUTURE.

                    • 7. Re: HAJMS and Message Driven Beans - Expected behaviour

                      We do not treat customers this way.

                      See my many previous posts about time wasters who make
                      no contributions to the project (or pay for support)
                      but still expect you to do *all* their work for them - even when it is:

                      1) clearly documented
                      2) discussed many times before
                      3) is an FAQ

                      If I am not allowed to use a LART
                      http://www.hyperdictionary.com/dictionary/Luser+Attitude+Re-adjustment+Tool
                      or delete redundant posts by people who don't RTFM, use search or read the FAQs
                      these forums will just fill up with mostly unanswered rubbish like most open source forums.
                      e.g. our previous DataSource config forum http://www.jboss.org/index.html?module=bb&op=viewforum&f=144

                      • 8. Re: HAJMS and Message Driven Beans - Expected behaviour
                        mredeker

                        Adrian,

                        I can fully understand you since I was already developing open source stuff myself and received annoying emails from people who do not like to RTFM.

                        I was just thinking maybe they can be pointed to the right FAQ or manual in a more polite way.

                        Thanks for the clarification.

                        • 9. Re: HAJMS and Message Driven Beans - Expected behaviour

                          Pointing people at documentation doesn't solve the problem.

                          All that happens is that lazy users use you as a search engine when there is perfectly
                          good one provided with the forums.