-
1. How much time a Message will reside in a Queue/Topic
jaikiran Mar 23, 2011 4:32 AM (in response to vinayknr41)Vinay Bommarati wrote:
Hello All
I have some doubts in JbossMessaging .............pls help
1) I have created a queue/topic ...and i sent some messages to queue...but , i din't deploy any MDB to listen to that queue........ Now , for how much time the queue can persists all its messages ...?? if i shutdown my server and start it again , will queue contain all its messages ....??
Messages to queues are durable (persisted) by default. They will survive restart.
Vinay Bommarati wrote:
2) Any one , pls tell the links to create topic ....becuase i can able to create a topic and MDB''s listening the topic also .........But in admin console the topic status is coming as down .............
I have created the topic In the following way :
<mbean
code="org.jboss.jms.server.destination.TopicService"
name="jboss.messaging.destination:service=Topic,name=ReceivingTopic"
xmbean-dd="xmdesc/Queue-xmbean.xml">
<attribute name="JNDIName">MessageBeanTopic</attribute>
<attribute name="RedeliveryDelay">1000</attribute>
<attribute name="MaxDeliveryAttempts">1</attribute>
<depends optional-attribute-name="ServerPeer">
jboss.messaging:service=ServerPeer
</depends>
<depends>
jboss.messaging:service=PostOffice
</depends>
<attribute name="SecurityConfig">
<security>
<role name="guest" read="true" create="true" write = "true" />
</security>
</attribute>
</mbean>
Which version of JBoss AS is this? Do you see any error messages in the server.log?
-
2. How much time a Message will reside in a Queue/Topic
vinayknr41 Mar 23, 2011 4:55 AM (in response to jaikiran)Hi jaikiran ,
Thanks for answering ........... Here , iam giving details for my second question
Coming To Topic Creation : Iam using jboss jboss-5.1.0.GA . ( So Jboss Messaging is default JMS Provider ... From Jboss Messaging User Guide , I have Created Topic as above ).
With above xml , MDB's listening to topics are receiving Messages as well ... But Pls see the image below...The status of topic is down
(MessageBeanTopic) : Its status is down
When I click on the topic to see the Number of durable messages :
Its giving me Exceptions in console like :
java.lang.reflect.UndeclaredThrowableException: Failed to get property 'allMessa
geCount' on component 'jboss.messaging.destination:name=ReceivingTopic,service=T
pic'.
at org.jboss.profileservice.management.KernelBusRuntimeComponentDispatch
er.get(KernelBusRuntimeComponentDispatcher.java:119)
at org.jboss.profileservice.management.DelegatingComponentDispatcherImpl
.get(DelegatingComponentDispatcherImpl.java:55)
at sun.reflect.GeneratedMethodAccessor381.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.aop.Dispatcher.invoke(Dispatcher.java:121)
at org.jboss.aspects.remoting.AOPRemotingInvocationHandler.invoke(AOPRem
otingInvocationHandler.java:82)
at org.jboss.profileservice.remoting.ProfileServiceInvocationHandler.inv
oke(ProfileServiceInvocationHandler.java:97)
at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:891)
at org.jboss.remoting.transport.local.LocalClientInvoker.invoke(LocalCli
entInvoker.java:106)
at org.jboss.remoting.Client.invoke(Client.java:1724)
at org.jboss.remoting.Client.invoke(Client.java:629)
at org.jboss.aspects.remoting.InvokeRemoteInterceptor.invoke(InvokeRemot
eInterceptor.java:60)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.
java:102)
at org.jboss.aspects.remoting.MergeMetaDataInterceptor.invoke(MergeMetaD
ataInterceptor.java:74)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.
java:102)
at org.jboss.aspects.security.SecurityClientInterceptor.invoke(SecurityC
lientInterceptor.java:65)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.
java:102)
at org.jboss.aop.generatedproxies.AOPProxy$0.get(AOPProxy$0.java)
at org.jboss.profileservice.management.ManagedPropertyDelegate.getValue(
ManagedPropertyDelegate.java:154)
at org.rhq.plugins.jbossas5.ManagedComponentComponent.getSimpleValue(Man
agedComponentComponent.java:239)
at org.rhq.plugins.jbossas5.ManagedComponentComponent.getValues(ManagedC
omponentComponent.java:183)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.rhq.core.pc.inventory.ResourceContainer$ComponentInvocationThread
.call(ResourceContainer.java:482)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:269)
at java.util.concurrent.FutureTask.run(FutureTask.java:123)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExec
utor.java:650)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor
.java:675)
at java.lang.Thread.run(Thread.java:595)
Caused by: javax.management.AttributeNotFoundException: not found: AllMessageCou
nt
at org.jboss.mx.server.AbstractMBeanInvoker.getAttribute(AbstractMBeanIn
nt
Caused by: javax.management.AttributeNotFoundException: not found: AllMessageCount
Iam Unable to Understand Why JBoss unable to Get MessageCount for this topic......?? If topic creation itself is a problem , Why MDB's are receiving Messages Perfectly ??
-
3. How much time a Message will reside in a Queue/Topic
jaikiran Mar 23, 2011 5:12 AM (in response to vinayknr41)I would suggest that you ignore the status and that error from the admin-console about the topic. There are some known issues with the status of various resources being reported in the admin-console. I think they have been fixed in JBoss AS6 (not sure). As long as your messaging is working fine, ignore the admin-console. If there are any errors when not using the admin-console, then it's a cause of concern.
-
4. How much time a Message will reside in a Queue/Topic
vinayknr41 Mar 23, 2011 5:24 AM (in response to jaikiran)@Jai : Ok , well .As long as MDB is receiving message its not a problem...... But , Can i migrate to HornetQ with Jboss AS 5 or is that a Complex task ?? And one more thing I observed is that , When I created Topic through Admin Console Its status is coming as Up .......
And Is there any another way to see the number of messages/Durable , non-durable Subscriptions of a topic like jmx-console or else any where et.??
Thanks In Advance
-
5. How much time a Message will reside in a Queue/Topic
jaikiran Mar 23, 2011 5:50 AM (in response to vinayknr41)Vinay Bommarati wrote:
@Jai : Ok , well .As long as MDB is receiving message its not a problem...... But , Can i migrate to HornetQ with Jboss AS 5 or is that a Complex task ??
Those details can be found here http://hornetq.sourceforge.net/docs/hornetq-2.1.2.Final/quickstart-guide/en/html/index.html
Vinay Bommarati wrote:
And Is there any another way to see the number of messages/Durable , non-durable Subscriptions of a topic like jmx-console or else any where et.??
The appropriate MBeans in jmx-console would perhaps have those info. I haven't checked the operations exposed by those MBeans.