-
1. Re: Multiple delivery to a MDB on a (clustered) topic
jaikiran Apr 24, 2012 5:22 AM (in response to gfeuede)Which exact version of AS7 is this?
-
2. Re: Multiple delivery to a MDB on a (clustered) topic
gfeuede Apr 24, 2012 7:11 AM (in response to jaikiran)JBoss identify itself as »JBoss AS 7.1.1.Final "Brontes"« on the console while startup. I use the JMS provider which are embedded in JBoss (HornetQ Server version 2.2.13.Final (HQ_2_2_13_FINAL_AS7, 122)) ...
-
3. Re: Multiple delivery to a MDB on a (clustered) topic
jaikiran Apr 24, 2012 7:22 AM (in response to gfeuede)Can you try this against the latest nightly build available here https://community.jboss.org/thread/167590
-
4. Re: Multiple delivery to a MDB on a (clustered) topic
gfeuede Apr 24, 2012 10:00 AM (in response to jaikiran)Hi,
I deployed the nightly build on all six nodes – no difference. The log lines are almost the same as in the first post of this thread (all but the IDs of course :-)
Another thing with the nightly build is, that the hornetq cluster was unable to communicate until I put <security-enabled>false</security-enabled> in the configuration. But this look like another issue, it was not enought to declare cluster-user and cluster-password.
-
5. Re: Multiple delivery to a MDB on a (clustered) topic
gfeuede Apr 24, 2012 11:28 AM (in response to gfeuede)I put the complete JBoss in DEBUG logging and I see two lines, which may be a hint:
17:18:32,849 DEBUG [org.hornetq.core.server.impl.QueueImpl] (Thread-27 (HornetQ-server-HornetQServerImpl::serverUUID=601ff423-8e20-11e1-add5-01db9b4286c7-4856794)) QueueImpl[name=3cc965d0-8b8d-4709-beca-f508565a9b48, postOffice=PostOfficeImpl [server=HornetQServerImpl::serverUUID=601ff423-8e20-11e1-add5-01db9b4286c7]]@93ffa doing deliver. messageReferences=1
17:18:32,849 DEBUG [org.hornetq.core.server.impl.QueueImpl] (Thread-26 (HornetQ-server-HornetQServerImpl::serverUUID=601ff423-8e20-11e1-add5-01db9b4286c7-4856794)) QueueImpl[name=825ee253-dbd2-4c82-81e0-537d23c8de7b, postOffice=PostOfficeImpl [server=HornetQServerImpl::serverUUID=601ff423-8e20-11e1-add5-01db9b4286c7]]@d45f89 doing deliver. messageReferences=1
Looks like there are two topics in the jboss, right? But in the config is one topic specified ... Or are the meaning of the lines, that two instances of the MDB are created?
-
6. Re: Multiple delivery to a MDB on a (clustered) topic
jmesnil Apr 24, 2012 12:00 PM (in response to gfeuede)1 of 1 people found this helpfulAs far as I can tell, it looks like the topic has 2 consumers bound to it and they both receive the same message.
Is it possible to have registered twice the MDB?
-
7. Re: Multiple delivery to a MDB on a (clustered) topic
gfeuede Apr 25, 2012 8:17 AM (in response to jmesnil)Hi,
my first suspicion was too, that the MDB was registered twice. I can't find any errors in the deployment. The content of the ear is correct, also the content of the jar with the MDB in it. For the MDB I use only the annotations, no xml deployment descriptors. The only xml in the ear are generated by maven and this setup is also simple as possible.
I found a workaround for my problem, I don't think it resolves the problem itself, but it does the job I want. I changed the annotation to this:
@MessageDriven(
activationConfig = {
@ActivationConfigProperty(
propertyName = "acknowledgeMode",
propertyValue = "Auto-acknowledge"
),
@ActivationConfigProperty(
propertyName = "destinationType",
propertyValue = "javax.jms.Topic"
),
@ActivationConfigProperty(
propertyName = "subscriptionDurability",
propertyValue = "Durable"
),
@ActivationConfigProperty(
propertyName = "subscriptionName",
propertyValue = "consumer"
),
@ActivationConfigProperty(
propertyName = "clientId",
propertyValue = "consumer"
),
@ActivationConfigProperty(
propertyName = "destination",
propertyValue = "java:jboss/exported/jms/topic/deliveryTopic"
)
}
)
This produces a lot of error messages (all the same), that a subscription already exist, but it leave at least one per node, so if I ignore the errors messages, this is what I had in mind.
One error message example is:
Cannot create a subscriber on the durable subscription since it already has subscriber(s)Is it possible, that the cause of this is the network setup? I have two network interfaces, one internal net for the cluster communication and one network for access from the »outside«?
-
8. Re: Multiple delivery to a MDB on a (clustered) topic
jaikiran Apr 25, 2012 8:21 AM (in response to gfeuede)Can you attach the entire server.log?
-
9. Re: Multiple delivery to a MDB on a (clustered) topic
gfeuede Apr 25, 2012 11:34 AM (in response to jaikiran)Hi,
in the attachement is the server log. It is from the JBoss 7.1.1.Final with the workaround described above …
-
server.log.zip 5.0 KB
-
-
10. Re: Multiple delivery to a MDB on a (clustered) topic
jaikiran Apr 25, 2012 11:55 AM (in response to gfeuede)1 of 1 people found this helpfulThe logs show that each MDB is being registered twice:
13:58:19,525 INFO [org.jboss.as.ejb3] (MSC service thread 1-1) JBAS014142: Started message driven bean 'DatabaseConsumer' with 'hornetq-ra' resource adapter
13:58:19,529 INFO [org.jboss.as.ejb3] (MSC service thread 1-2) JBAS014142: Started message driven bean 'DatabaseConsumerZwei' with 'hornetq-ra' resource adapter
13:58:19,567 INFO [org.jboss.as.ejb3] (MSC service thread 1-1) JBAS014142: Started message driven bean 'DatabaseConsumer' with 'hornetq-ra' resource adapter
13:58:19,582 INFO [org.jboss.as.ejb3] (MSC service thread 1-2) JBAS014142: Started message driven bean 'DatabaseConsumerZwei' with 'hornetq-ra' resource adapter
What does your application packaging look like and where are they MDBs located in the application?
-
11. Re: Multiple delivery to a MDB on a (clustered) topic
gfeuede Apr 26, 2012 5:48 AM (in response to jaikiran)Hi,
I'm feeling so stupid. In the end, it was really an deployment bug. After your answer I checked the complete deployment and maven put the MDB in the client jar, which is used by a war in the ear. After appending »Bean« to the classnames, maven didn't put the MDB in the client jar and everthing looks fine now.
Thank you very much!
-
12. Re: Multiple delivery to a MDB on a (clustered) topic
gfeuede Apr 26, 2012 5:50 AM (in response to jmesnil)Thanks to you too, you where right. The reason is in the post before.