MDB is not consuming Messages from Queue on standalone Hornetq
karna1824 Apr 4, 2014 8:51 AMi am using wildfly-8.0.0.Final and hornetq-2.4.0.Final.
I'm trying to read messages from queues on hornetq server using MDB. my MDB is running on wildfly.
First i removed all messaging configuration from standalone.xml(wildfly).In hornetq-2.4.0.Final, i added my queue in hornetq-jms.xml.
In my MDB, I gave
@MessageDriven(activationConfig = {
@ActivationConfigProperty(propertyName = "destinationType", propertyValue = "javax.jms.Queue"),
@ActivationConfigProperty(propertyName = "destination", propertyValue = "queue/MyQueue"),
@ActivationConfigProperty(propertyName = "acknowledgeMode", propertyValue = "Auto-acknowledge"),
@ActivationConfigProperty(propertyName = "connectorClassName", propertyValue = "org.hornetq.core.remoting.impl.netty.NettyConnectorFactory"),
@ActivationConfigProperty(propertyName = "connectionParameters", propertyValue = "host=localhost;port=5445")})
@ResourceAdapter("hornetq-ra.rar")
Then i started both servers(wildfly,hornetq), hornetq server started smoothly but in wildfly while deploying MDB(M2MEventDistributor), it threw error as,
JBAS014613: Operation ("deploy") failed - address: ([("deployment" => "M2MEventDistributor.jar")]) - failure description: {"JBAS014771: Services with missing/unavailable dependencies" => ["jboss.deployment.unit.\"M2MEventDistributor.jar\".component.M2MEventDistributorMDB.CREATE is missing [jboss.ra.hornetq-ra]"]}
and
2014-04-04 13:32:29,042 INFO [org.jboss.as.controller] (DeploymentScanner-threads - 1)JBAS014774: Service status report
JBAS014775: New missing/unsatisfied dependencies:
service jboss.ra.hornetq-ra (missing) dependents: [service jboss.deployment.unit."M2MEventDistributor.jar".component.M2MEventDistributorMDB.CREATE]
I found that the issue is with hornet-ra adapter,
I searched in internet about this issue and referred links and followed instructions in them, but hard luck, nothing helped me.
Everyone in net, forums, blogs, and communities are saying about deploying hornetq-ra.rar and changing the ra.xml file in that rar file. In wildfly i didn't even find any clue about hornet-ra.rar and ra.xml. But i found hornet-ra-2.4.1.Final.jar in wildfly modules then i added that jar to MDB classpath and also mentioned in the jboss-deployment-structure.xml file. Then also i'm getting the same error.
And then i followed this link https://community.jboss.org/message/756775 , and tried steps which are given by andy taylor except things regarding hornet-ra.rar and ra.xml file, because i don't know where i have to find them.
Then my MDB got deployed but not consuming messages from the queue. in log i found one line,
[org.hornetq.ra] (default-threads - 1) HQ151000: awaiting topic/queue creation queue/MyQueue
So, my questions are,
1) how can i use hornetq-ra adapter to consume messages from queue on standalone hornetq server?
2) where i can find hornet-ra.rar and ra.xml file in wildfly-8.0.0.Final and how can i deploy and use it?
3) where i'm doing wrong and what should i do to get my work done?
If you need any information and files i'll provide immediately...
Can anybody help me to get rid this problem... Thank you in advance..