Problem in using Durable subscribers
I am facing a strange problem. I am using JBoss App Server as JMS provider. I have a client which is nothing but a durable subscriber(consumer). I am registering the client with a client ID that is generated dynamically everytime the client comes up. Also the consumer has some message selectors. Assume this client is not running and any other client is publishing message for this clinet. When this durable subscriber client comes up, it is not receiving the message. If the client is active when the message is published, it is receiving and processing the message( It is behaving like a non-durable subscriber). I don't know why this problem is happening. Does it have something to do with client ID?? Any help in this regard will be highly appreciated. You can also reach me through my mail id ( [email protected]).
Thanx
The durable subscription name is actually made up of a combination of the client id and the durable subscription name.
In order to pick up a previously created durable subscription you need to have the same client id, as you are dynamically generating a different client id each time you are getting new durable subscription. Hence it looks like they are non-durable.
I don't know anything about JBoss, but if it has tools for looking at durable subscriptions I would use it, you'll find that their are many.
Hope this helps
Alasdair
Similar Messages
-
Query regarding durable subscribers in JMS Adapter (11g)
Hi , I am facing some issue with using durable subscribers..
I am doing a POC in which I have two consumers (consumer 1 and consumer 2) listening to a topic.
On the server console, the monitor tab of the JMS topic shows number of consumers as 2 which is good.
Also, when any message is put on the topic , BPEL processes for both consumers get triggered as expected.
Now, I add durable subscriber ID as 123 to one of the consumers (consumer 1)
After deploying the code, the count for the number of current consumers listening becomes 1.
So I create a durable subscriber on the console with id as 123 after which the consumer count is back to 2.
The issue however is that, now when I put a message on topic , only consumer 2 is triggered.
The message for consumer 1 can be seen on the durable subscriber 123's page.
My question is that, since the consumer is listening to the topic then why is the message going to the subscriber instead of creating instance ?
I also tried following :
1. created a new outbound connection pool in the resource adapter
2. setting property FactoryProperties to value "ClientID=123"
3. pointing the adapter connection factory to this new location
but this is also not helping.
Could anyone please help me out in this ?
Thanks and Regards,
Ketandid u have any luck? can u tell me steps
-
Create durable subscribers, JMSAdapter JNDI and DBAdapter JNDI using WLST
Hi All,
I have developed some WLST scripts to create new JMS servers, JMS modules which includes queues, topics and connection factories, data sources, etc.
I can successfully create topics using WLST but I cannot see any option to create durable subscribers using WLST. Also, I can create JMS server JNDIs along with its modules but I am unable to create JMSAdapter JNDI ( under Deployments ) using WLST.
Can anyone please help me out?
Thanks in advance,
-KaranHi,
I have the same problem, and when I try to record it. The py file contains nothing.
I know sometime weblogic server doesn't record, such as outbound connection factory. I guess durable Subscribers is another one.
Anyone know know to do this?
Cheers,
Tim -
Hello,
I am building an application that has two WebLogic servers
communicating certain information between them using JMS. I am using
WebLogics implementation of JMS including destinations and messaging
bridges.
I am experiencing some problems.
Server 1 takes files and puts them in a Stream Message and publishes
them to a topic as shown here:
Context context = new InitialContext();
TopicConnectionFactory topicFactory = (TopicConnectionFactory)
context.lookup(sourceDescriptor.getConnectionFactory());
connection = topicFactory.createTopicConnection();
session = connection.createTopicSession(false,
Session.CLIENT_ACKNOWLEDGE);
Topic topic = (Topic)
context.lookup(sourceDescriptor.getTopicJNDIName());
TopicPublisher publisher = session.createPublisher(topic);
publisher.setDeliveryMode(DeliveryMode.PERSISTENT);
StreamMessage message = session.createStreamMessage();
for (int i = 0; i < files.length; i++)
Loop through reading a set of files into the StreamMessage publishing
each.
publisher.publish(message);
Topic config.xml
<JMSTopic JNDIName="topic/topicName"
Name="Topic Name" StoreEnabled="default"/>
Destination config.xml
<JMSBridgeDestination
AdapterJNDIName="eis.jms.WLSConnectionFactoryJNDINoTX"
ConnectionFactoryJNDIName="ConnectionFactory"
ConnectionURL="t3://localhost:7001"
DestinationJNDIName="queue/queueName" Name="Queue Destination
Name"/>
<JMSBridgeDestination
AdapterJNDIName="eis.jms.WLSConnectionFactoryJNDINoTX"
ConnectionFactoryJNDIName="ConnectionFactory"
ConnectionURL="t3://machinename:8001"
DestinationJNDIName="topic/topicName"
DestinationType="Topic" Name="Topic Source Name"/>
Messaging Bridge config.xml
<MessagingBridge
Name="The Bridge"
QOSDegradationAllowed="true" QualityOfService="Duplicate-okay"
SourceDestination="Topic Source Name"
TargetDestination="Queue Destination Name" Targets="server1"/>
Connection Factory
<JMSConnectionFactory JNDIName="ConnectionFactory"
Name="Server1 Connection Factory" Targets="server1"/>
All settings in WebLogic are default for the configuration of this as
far as I know.
The bridge is using Duplicate Ok QOS at this point.
This works like a charm as long as server which has the destination
queue is up and running and has received messages in the past.
The first problem is the first set of messesages are sent to the Queue
on Server 2 but the MDB does not pick them up. I have left it running
for an hour and these messages sit in the pending state for the
monitoring of the Queue. In order to get this first set of messages
to be processed I have to restart Server 2 at which point the initial
messages are processed. Any subsequent messages are processed by the
MDB immediately upon delivery. What is the cause of this and is there
any way around having to restart after the first messages are received
creating the file in the message store? Does this have anything to do
with the fact that there is no file in the message store until the
first messages are received and thus the MDB is not looking since
there was nothing there on start up? This seems very odd....
The second problem has to do with durability. I start Server 1 and it
waits for a finish file and when it sees it it takes the files and
puts them on the topic as described. As long as Server 2 is up and
running at that time everything is fine. If However Server 2 is not
running at that moment and is started at a later time then the
messages seem to be lost. What could cause this? Is there any way I
can visually see that the message is being held on Server 1? The
bridge from this topic on Server 1 to the queue on Server 2 is
configured on Sever 1 and you can see that it is working when Server 2
is not running due to the connection refused messages the bridge
throws. Is the bridge accepting the messages from the topic enough
for the topic to decide it is done with them and delete them? Could
the acknowledgement from the queue on another bridge for the same
topic be confusing the topic and deleteing the message before all
subscribers get it? This is a big issue since it seems that durabilty
is only guarenteed when both servers are running and a message is
created.
Any help on this would be appreciated...If you wouldn't mind cutting
and pasting any responses to my email as well it would be appreciated
as I use google for groups and it has a long turn around.
TIA...
Hi Kartheek,
Once we create a TOPIC in NWA.In durable subscribers tab subscription ID and Subscription name will be automatically created once you publish the message in to TOPIC.
check in NWA-->jms server configuration-->durable subscribers.
thanks
Purna -
Two durable subscribers with same ID in Weblogic 9.2 MP 2?
External JMS durable topic subsribers of a distributed topic destination are connected to a Weblogic cluster with 3 Nodes. The clients are started with shell scripts on different hosts. A watchdog is checking if the clients are still alive; if not, they are restarted automatically. Randomly a node of the cluster is chosen and the client is reconnected (Note: Weblogic does not support durable topic subscribers for distributed destinations, this means you cannot connect with a cluster URL)
However, from time to time we see two durable topic subscribers with the SAME ID connected on two different destinations: one of them is active, the other is not.
This should not be possible. Is this a Weblogic bug or a mis-configuration of our domain.
Thanks,
PeterIt turned out that our operating team stops the clients with "kill -9". I guess that this may be the reason that the durable subscribers remain registrated on the server? Of course, one should never use "kill -9", however sometimes this can not be avoided:
- Weblogic 8.1 SP 4 could not startup if a durable "ghost" subscriber was registrated
- Weblogic 8.1 SP 6 could handle this in a robust way!
- Weblogic 9.2 MP1/2 seems to go to an unstable state. Once, for example, we registrated 1635 connections for one Weblogic instance with the state "CLOSE_WAIT" (Of course you may argue this may be the cause of our inconvinience. However, normally this value is less than 20)
The fact that the durable subscribers are not correctly placed in the Weblogic console may not be correlated to the problem above, but just another bug. It is just annoying, as it is nearly impossible to unregister the durable "ghost" subscriber via the console. Sometimes even the subscriber id is not shown.
Do my comments sound reasonable?
Thanks, Peter -
Hi,
I have a server which connects to MQSeries topics with a durable subscriber.
Now, if my program is terminated unexpectetly, the subscriber cannot be made inactive(closed). If I then want to restart my program (so trying to connect to the topic with the same durable subscriberID), I sometimes get the error that there is still an active subscriber (which is normal, since previous one did not end correctly). Is there somehow a way to list all durable subscribers for a topic and/or to remove them (make them inactive)??
I hope my question is clear.
Thanx in advance,
Sstevenhi,
I have exactly the same problem with IBM's implementation of JMS and could not find any workaround. One of IBM redbooks claims that there is a Cleanup utility that can be used to cleanup these type of subscribers, however, the utility only supports Java 1.3. I can't seem to find a version that supports 1.2. Did you have the problem resolved? What is your solution?
Your help will be greatly appreciated!!
ckshen00 -
Non-durable subscribers persists after the end of their JMS session
Hi all,
I'm using OAQ as my JMS Provider.
I have created code for publishing and recieving messages to/from topics. Messaging works fine, but I have one problem:
All my non-durable subscribers persists after the end of their JMS session. I always perform unsubscribe operation in code and then closing session and connection.
When I subscribe to topic, there's one more line in DB table ( etc. NAME: TSUB_1_24E6DB98A2EB7712E040A8C, TYPE: 65). I have expected that subscribers will be deleted after performing unsubscribe operation, but they don't...
Can you help me with this problem? Thanks for any answer.
Best Regards,
JurajHave you found a solution to this yet - because I face the same problem
-
What happens if I don't set a client id for durable subscribers?
What happens if I don't set a client id for durable subscribers?
If you do not set a clientID in 2.0, it will automatically set a clientID for
you. This means that you MUST unsubscribe the durable subscriber on the same
host (since otherwise the clientID's will be different)
In general, its good practice to set a client ID anytime you are using durables
(so that you have some control). -
Weblogic admin - deleting multiple durable subscribers?
I may be in the wrong forum, but there is a problem in our code that has resulted in over 700 inactive durable subscribers. From the weblogic console gui, I can only delete these one by one. Is there a way to delete multiple subscribers (perhaps from the command line) without deleting the JMSTopic. One by one will take quite a long time.
thanks in advance - DanIf the store has no data that you care about, you could shutdown WebLogic and delete the store's file(s) (or database table(s) if its a JDBC store), then restart WebLogic.
The durable subscriber delete is available on the runtime mbeans, so another option is to write a WLST script or java program to call the deletes. I don't personally have any sample code for this.
Tom -
Doubt about durable subscribers
I read this in the weblogic docs
For durable subscriptions, WebLogic JMS stores a message in a persistent
file or database until the message has been delivered to the subscribers
or has expired, even if those subscribers are not active at the time
that the message is delivered. A subscriber is considered active if the
Java object that represents it exists. Durable subscriptions are
supported for Pub/Sub messaging only.
Now how does the weblogic server know how many subscribers are there? To
describe more accurately
1. One weblogic server, say version 7.0. One topic has been configured
along with
the other required stuff.
2. Suppose 3 subcribers connect to the server
3. A message is sent to the topic.
4. Now if I kill one of the subscribers then is weblogic going to wait
to deliver to the killed subscriber before marking the message as
delivered?
Shiva.
WebLogic does not do anything different than any other
JMS vendor. The behavior of durable subscriptions is
explicitly defined in the JMS standards.
The durable subscriber client explicitly creates "subscription"
when it first comes up. The JMS server stores a record of this
subscription both in memory and on disk. The subscription
does not go away until the client explicitly calls
"unsubscribe" to delete it. The subscription,
as per the JMS spec, is uniquely identified by a combination
of: the topic specified by the client, the connection-id
specified by the client, and the subscriber-id specified by
the client. The subscription is not identified in any
way by "JVM id". All messages sent after the subscription
is created accumulate, even if the client is disconnected.
The client reconnects by specifying by subscribing with the
same identifiers it used to so subscribe previously.
Tom
Shiva P wrote:
> Guess my question is not clear. Here it is again.
>
> How does weblogic know that it has to wait for the durable subscriber? I mean
> is it the JVM id of the subscriber or some other unique thing that weblogic
> uses to know about all the durable subscribers?
>
> shiva.
>
> Tom Barnes wrote:
>
>
>>Shiva P wrote:
>>
>>>I read this in the weblogic docs
>>>For durable subscriptions, WebLogic JMS stores a message in a persistent
>>>file or database until the message has been delivered to the subscribers
>>>or has expired, even if those subscribers are not active at the time
>>>that the message is delivered. A subscriber is considered active if the
>>>Java object that represents it exists. Durable subscriptions are
>>>supported for Pub/Sub messaging only.
>>>
>>>Now how does the weblogic server know how many subscribers are there? To
>>>describe more accurately
>>>
>>>1. One weblogic server, say version 7.0. One topic has been configured
>>>along with
>>>the other required stuff.
>>>2. Suppose 3 subcribers connect to the server
>>>3. A message is sent to the topic.
>>>4. Now if I kill one of the subscribers then is weblogic going to wait
>>>to deliver to the killed subscriber before marking the message as
>>>delivered?
>>
>>Yes, if the subscription is durable.
>>
>>Durable subscription continue to exist even if the consumer
>>is killed (or closed). Messages continue to accumulate in
>>them. This is the whole purpose of durable subscriptions. If
>>you want the messages to go away when the consumer goes away
>>do not use a durable subscriptions.
>>
>>Tom
>>
>>
>>>Shiva.
>>>
>>
>
-
Hi,
I am currently developing an application in java that will use Oracle 8i's (8.1.7 to be more specific) Advanced Queuing Java API. Is there any way to mimic a non-durable subscriber in Oracle 8i? Both 8i and 9i don't support non durable subscribers.
Thanks,
Jeff
nullI'm not sure what exactly you mean by non-durable subscribers. If you are mean the subscriptions should be dropped after the session is deleted - you can create unique subscriber names for every session and unsubscribe when a session is closed. You'll have to record these subscriber names somewhere persistently and in case of abnormal session termination, you'll have to drop them later
-
Multiple durable subscribers and message redelivery
I am using WLS 8.1 SP1. I have a topic that has several durable MDB subscribers. In the case one of the MDB rolled back the TX, upon redelivery of the message, do all durable subscribers receive the message again, or just the one that rolled back the TX gets the redelivered message?
Thanks.Hi Eric!
Each durable subscription gets its own copy of each published message, and only one MDB deployment can attach to a particular durable subscription at a time. So when an MDB durable subscriber rolls back the receive of a message, the rolled back message will be redelivered to the same MDB deployment only.
The same reasoning applies to non-durable subscriptions as well.
Tom, BEA -
Is it possible to "purge" durable subscriptions established by JMS clients ? Any APIs available for this ?
Here is the scenrio. My application has a unique ID. The application establishes durable subscribers to a few topics. The uniqe ID is used in the setClientID() of the topic connection. Based on the messages it receives, the application would create more durable subscribers . All the subscribers are
created off of the same topic connection object.
When I "uninstall" the application, I want to "unsubscribe" or "remove" all the subscriptions established by the application. All I know about the application is the Unique ID and I do not know the subscriber id of the individual durable subscribers.
So, my question is, is it possible to "remove" all the subscription created by the application given the client id used in the application ?
TopicSession.unsubscribe() wont work for me because I do not know the subscriber id.
Is there a "Management" API availabe to to this ?There is no management API to do what you described.
The MQ administration utilities do have support for purging
and destroying durable subscribers though. See the
'Managing Durable Subscriptions' section of chapter 6 in
the MQ Administration Guide.
imqcmd list dur -d topicName
imqcmd purge dur -n durableName -c clientID
imqcmd destroy dur -n durableName -c clientID
hope this helps,
-isa -
Durable subscribers loosing messages
Hi,
This is wls 8.1.4
We have a distributed topic (T) with durable subscribers (DS)connected to both the member topics.
Looks like the DS's connected to Member Topic 1 (MT1) loose some of the messages posted to T.
DS's connected to MT2 get all the messages.
From the admin console I also see that one of the Weblogic durable subscribers to MT1 is inactive and has a backlog.
Not sure if this is causing the problem.
WeblogicJmsDistributedTopic@Remote@MT1@Local@MT2@Dist@T
is inactive and has backlog
WeblogicJmsDistributedTopic@Remote@MT2@Local@MT1@Dist@T
is active
Thanx,Hi Kartheek,
Once we create a TOPIC in NWA.In durable subscribers tab subscription ID and Subscription name will be automatically created once you publish the message in to TOPIC.
check in NWA-->jms server configuration-->durable subscribers.
thanks
Purna -
Durable Subscribers ClientID issue
I am having an issue with client ID's on my durable subscribers. In order to ensure each is unique, we are using the IP address of the system as the client ID and the hostname as the subscription name. At first, it seems fine with 10.x.x.x as the clientid and p12t1 as the subscription name, but after a while, it comes up with 10 for the client ID and x.x.x.p12t1 as the subscription name. Everything seems to be working fine in the sense of the subscribers, but now all have a client ID of 10 and I cannot just delete one anymore.
Has anyone ever seen this?Hi Kartheek,
Once we create a TOPIC in NWA.In durable subscribers tab subscription ID and Subscription name will be automatically created once you publish the message in to TOPIC.
check in NWA-->jms server configuration-->durable subscribers.
thanks
Purna
Maybe you are looking for
-
TS1363 My ipod nano touch is not seen by itunes
My itunes doesn't see or recognize my ipod nano touch
-
IP Configuration issue with Airport Extreme
When configuring my Airport Extreme to use the AT&T DSL internet connection, an IP Configuration conflict is reported. My IP address is shown as in use by the Ethernet ID - DHCP Server. As a consequence, the Airport is not reporting an IP address
-
I am configuring ARA 10.1 for a ECC 6.0 plug in development system and facing this issue. Risk Analysis at user level shows no data in all 3 views though at role level shows risks of global rule set. I am using Global rule set. I generated all risks
-
Reg lsmw for customer master data transfer
Hello All, I want to know while transfering data by lsmw for customer master data . Scenario : There are more then one ship-to-party and bill to party so how to upload the data in this case????? Thanks, Sunny
-
is there any function module to manage upper case and lower cases