Dynamic Topics in JMS

Hi,
I'm not sure if something like this is possible so I am looking for some guidance please.
I need publish/subscribe functionality. I have countless number of Items/products/things that I would like users to be able to subscribe to. User sees an item and they "subscribe" to that item for notifications of any changes to that item.
Subscribing to a JMS Topics seem to limited. It seems to only allow the user to: subscribe(SOME_TOPIC) Doing this the JMS Topic has no idea that the user really wants only notifications for a specific item (like ITEM_1 or ITEM_n).
I don't see a way to dynamically create JMS Topics like subscribe(ITEM_1_TOPIC) and also subscribe(ITEM_n_TOPIC)Any help would be greatly appreciated.
The implementation of the JMS MDB Topic would be same except for only the value passed in to the Topic's 'subscribe' method.
Thanks,
Jared

I think what your question boils down to is whether you can call Session.createTopic(topicName) to create new topics on-the-fly. The JMS specification doesn't require this to be possible, but many vendors including Glassfish Message Queue do allow this.
If your JMS provider doesn't allow dynamically-created topics you can achieve the same effect by using a standard topic name and then a message selector to "filter" the topic. A message selector allows the consumer to specify that they want to receive only those messages which match some specified condition based on a message property.
Nigel

Similar Messages

  • How to create and use dynamic queue in JMS

    Plz tell me how to create and use a dynamic queue in jms and can reciever file lookup it as it lookup any server configurred queue(written in the server).

    Hi,
    We can use Azure File services to do this, for more information, please have a look at this article:
    http://blogs.msdn.com/b/windowsazurestorage/archive/2014/05/12/introducing-microsoft-azure-file-service.aspx. The Azure File service exposes file shares using the standard SMB 2.1 protocol. Applications running in Azure can now easily share files between
    VMs using standard and familiar file system APIs like ReadFile and WriteFile.
    Best Regards,
    Jambor
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Dynamic Queues using JMS Adapter - Possible?

    Can anyone advise if its possible to dynamically set the JMS Queue DestinationName at runtime when using the JMS Adapter?
    My guess is not, but I thought I'd ask anyway...
    Dennis

    Hi Dennis,
    Did u get a solution for this.
    Even i have a same scenario where i have to select the destination queue dynamically.
    Any help in this regards...
    Regards
    Ashwini

  • JMS distrubuted topic and jms inbound adapter

    Hi,
    We are building a HA application using precise recovery using JMS. FOr that we want to create a distributed JMS Topic (ckustered JMS Topic). As we understand things, when a JMS subscriber subscribes to a distributed Topic it is actually wired to a sopecific server (a specific fisical JMS Topic). When this JMS server fails the connection is dropped and the JMS subscriber needs to reconnect.
    1. Is our understanging correct?
    2. If yes and we need to reconnect to the surviving JMS Topic, is there a way to "tell" the JMS Inbound adapter to do so? Is it done automatically by the adapter?
    Thanks,

    There are a few different things you should be considering when configuring JMS for precise recovery, so I'm afraid this is going to be a long response.
    * The precise recovery feature may not work correctly in the case where JMS output messages are lost. Avoiding message loss in the case of a JMS failure involving topics requires the use of persistent messages and durable subscribers. This is true regardless of whether you're using Distributed Topics or a Topic hosted by a single server. So use of durable subscribers is highly recommended when using CEP precise recovery.
    * The CEP JMS input adapter won't actually support durable subscriptions until the upcoming 11.1.1.6 (PS5) release. So if you want to use durable subscriptions to avoid problems with precise recovery in the case of JMS server failure you would need to be on this release of CEP (at least for production).
    * If you're using the CEP JMS inbound adapter with a distributed topic and a non-durable subscription, you can configure the adapter destination-jndi-name with the logical name of the topic and if the topic member servicing a given consumer fails, the consumer will reconnect to a surviving topic member. This works because you're using a logical destination name (not a physical host name or IP address), so the adapter is able to determine the surviving servers associated with the logical topic and reconnect to one of them. However since you'd be using non-durable subscriptions in this case to achieve failover/reconnect, you can have the problem described above with message loss and precise recovery (non-durable subscribers/non-persistent messaging can lose messages during the actual failover/reconnect).
    * Unfortunately, WLS doesn't support durable subscriptions to distributed topics using the logical destination name. When using distributed topics you can only create durable subscriptions on specific topic members, and since these are subscriptions to a specific physical member these subscribers won't failover to another topic member if the server hosting their subscription fails.
    So given all of the above you can see that the use of distributed topics with CEP precise recovery may not provide the ideal level of HA (the ability to handle combinations of JMS and CEP failures). You might want to consider using a non-distributed (single server) topic with persistent messaging and durable subscriptions as an alternate approach for precise recovery. In this configuration JMS server failure would require restarting the failed server, but once the JMS server is restarted there should be no message loss and CEP precise recovery should work correctly.
    If you're determined to use distributed topics you might want to try posting to the JMS forum to see if anyone there has ideas for other solutions. Just let them know that CEP in this case is essentially acting as a vanilla JMS client (not MDB based) that can't tolerate message loss:
    WebLogic Server - JMS

  • Queue versus Topic in JMS

    Can somebody tell me the difference between queue and Topic in JMS?

    Queues are used to send messages between single applications, as far as I recall. App A puts a message in Queue Q and App B consumes the message, once B has consumed the message no other application can 'read' it.
    A topic allows application A to broadcast a message to every other application that is listeningo on the topic.
    It's the difference between whispering and shouting.
    J

  • SOA Suite 11g - dynamic JNDI destination JMS adapter

    hi there soa suite users,
    im currently using oracle soa suite 11g,
    my use case having a bpel process processing something
    and then route the result to several queue.
    like this:
    jms/adminduk/queue/mks1
    jms/adminduk/queue/pdg1,
    etc...
    so the destination name can be build dynamically in the bpel,
    and i stored in a string variable "destName".
    (im using WLS 10.3 jms)
    now i need to invoke a jms adapter service with produce operation,
    but the queue destination needs to be using the variable "destName".
    i already tried using assigning to property "jca.jms.JMSDestinationName"
    in the invoke activity.
    <invoke ...>
    <bpelx:inputProperty name="jca.jms.JMSDestinationName"
    variable="destName"/>
    </invoke>
    but it seems not working, and im getting this error:
    Caused by: com.oracle.bpel.client.BPELFault: faultName: {{http://schemas.oracle.com/bpel/extension}bindingFault}
    parts: {{
    summary=<summary>Exception occured when binding was invoked.
    Exception occured during invocation of JCA binding: "JCA Binding execute of Reference operation
    'SendSinkBioWniFromDaerahResponse' failed du
    e to: ERRJMS_ERR_CR_QUEUE_PROD.
    ERRJMS_ERR_CR_QUEUE_PROD.
    Unable to create Queue producer due to JMSException.
    The invoked JCA adapter raised a resource exception.
    Please examine the above error message carefully to determine a resolution.
    </summary>
    ,detail=<detail>[JMSExceptions:045103]While trying to find a topic or a queue we could not find the specific JMSServer
    requested. The linked
    exception may contain more information about the reason for failure.</detail>
    ,code=<code>null</code>
    this is a basic use case of jms interoperability,
    anyone have answers to this ??
    thank you :)

    Hi,
    If someone is looking to dynamically set the JMSqueue name here is the solution.
    in the Invoke activity set "jca.jms.JMSDestinationName"
    value to "JMSHeaderVariable"
    set the type to "input"
    in the JMSHeaderVariable set the queue name dynamically.
    and in the JMSadapter give any valid queue name, still the message will be routed to the queue which you have set in the invoke adapter.

  • Create dynamic Topics in WebLogic 12c?

    I am new to both JMS and WebLogic, and I can't seem to figure out how to properly run my JMS solution in WebLogic. I have developed my proof-of-concept with Active MQ, but the application will eventually need to run on WebLogic.
    Active MQ allowed me to create Topics dynamically, by simply calling createTopic() on TopicSession. If the Topic doesn't exist, it is created, which is exactly what I need. I can't figure out an easy way to do this in WebLogic. I know that createTopic() won't work as per the documentation:
       Note: The createQueue() and createTopic() methods do not create destinations dynamically; they create only references to destinations that already exist.
       For information about creating destinations dynamically, see Chapter 7, "Using JMS Module Helper to Manage Applications."
    I am aware that there is a `JMSModuleHelper` class, but the javadoc says the following:
       Note: Oracle recommends that the use of the create (distributed)queue/topic methods be strictly limited, as they directly modify the associated
       JMS Module configuration (your-jms.xml) file and provide minimal feedback for detecting success or failure.
    In addition to this warning, the usage of this class involves complex manipulation of MBeans and requires the knowledge of which server my application is running on. This is very inconvenient, since my app will be deployed to multiple servers based on the desired environment (ie. Integration Test, System Test, UAT, Prod, etc).
    Is there really no easy way to use dynamic Destinations in WebLogic?
    This makes me wonder if my entire JMS based design might be misguided... The idea is that I have 5 different applications, but these applications share a large user base among themselves. These users have consistent IDs among the applications. Some events within any of the applications trigger a JMS message that is broadcast to a Topic with a name derived from the currently logged in USER_ID. Every time a user logs into any of the apps, the app subscribes to that USER_ID_Topic, with the application name being the Subscription ID. This way the message is broadcast to all users when they log in to any of the 5 applications, yet there is a well defined, centralized Topic for all applications to push their user events into.
    Is there a way to do this in WebLogic, or is this a bad approach?
    Any advice would be appreciated!
    Val

    I think what your question boils down to is whether you can call Session.createTopic(topicName) to create new topics on-the-fly. The JMS specification doesn't require this to be possible, but many vendors including Glassfish Message Queue do allow this.
    If your JMS provider doesn't allow dynamically-created topics you can achieve the same effect by using a standard topic name and then a message selector to "filter" the topic. A message selector allows the consumer to specify that they want to receive only those messages which match some specified condition based on a message property.
    Nigel

  • Dynamic topics and queues

    I'd like to know if a JMS client can create a topic or queue dynamically to be used by others JMS clients, or this is a operation which only can be performed by JMS server.
    Thanks in advance.

    I should add that the JMS spec does define an API for creating 'temporary destinations', e.g., using the QueueSession.createTemporaryQueue() method. However these have a few limitations over standard destinations: firstly, they only survive for the lifetime of the connection from which they were created, when the connection is closed the destination is destroyed and the contents is lost; secondly, although producers from any connection can produce messages to a temporary destination, only consumers that belong to the same connection within which the temporary destination was created are able to consume from a given temporary destination. All that said, temporary destinations can often be useful, particularly for handling request/response type interactions - see QueueRequestors too for more info.
    Best regards,
    David Ingham
    Arjuna Technologies - http://www.arjuna.com

  • Dynamic Configuration of JMS/FTP Adapter

    Hi,
    I have a requirement where
    1. A single JMS adapter is used to connecting different MQ client. I want to send the details about the configuration at the run time.
    2. With respect to FTP adpater we are having a different Server from where the file is pulled.
    Is it possible to do a dynamic (Rum Time) configuration of parameter of JMS Adapter, FTP adapter?
    Thanks
    Gautam
    Edited by: sharmagt on Jun 11, 2010 7:10 AM

    Hi,
    >>>1. A single JMS adapter is used to connecting different MQ client. I want to send the details about the configuration at the run time.
    you can only set those: Adapter-Specific Message Attributes
    from
    http://help.sap.com/saphelp_nw70/helpdata/en/f4/2d6189f0e27a4894ad517961762db7/content.htm
    >>>2. With respect to FTP adpater we are having a different Server from where the file is pulled.
    this is not possible in standard
    Regards,
    Michal Krawczyk

  • Using dynamic queues in jms

    I am making messenger using jms
    Can anyone tell me
    **if createQueue() or createTemporaryQueue() should be used for queue creation.
    **if createTemporaryQueue() is used,i think offline messages can't be sent
    **i am unable to create the queue,plz tell exactly how i can create it
    Thanx in advance

    createQueue/Topic do not create the physical destination but only the address to it. Queues and Topics are administered objects in JMS and are usually created by your JMS vendors admin tools / config files. Some provider even create the destinations on the fly (first use).
    -- Andreas

  • WebLogic 9.2MP2.Messages Pending topic count JMS display negative value

    on admin console. Services -> Messaging -> JMS Modules in JMS System Modules -> JMS queue name -> Monitoring role tab .
    I use WebLogic 9.2MP2 version . I found that JMS destination summaize page, Messages Pending topic count display negative value.
    What is mean negative value ? or that bug of WebLogic9.2 MP2.
    Thank you.
    BR,

    A negative value indicates a bug -- quite likely in internal statistics gathering code itself. I don't know if the problem has been addressed in later MPs or later versions.
    Tom

  • No way to drop dynamic topic created with JMSHelper classes ?

    I just want to know if there is any trick to drop such topic without
              using the administration
              For information for test we could have more than 100,000 topics
              created
              Thanks
              

    Tom Barnes <[email protected]> wrote in message news:<[email protected]>...
              > Consult the JMX guide for information on how to use the mbean APIs to
              > manage WebLogic. This is how one would delete a topic.
              >
              > However, 100,000 topics is off the charts for a single server. A few
              > thousand, perhaps
              > 10000, is the most I have heard of in my experience. Perhaps someone
              > else on the
              > newsgroup has tried this? Note that once the number of configured
              > destinations
              > gets high, some customers have found it better performing to manipulate
              > the config.xml
              > file directly rather than use the APIs. (Note that destinations were
              > not intended to be
              > highly dynamic objects...)
              >
              > Tom
              >
              > cri_tophe wrote:
              >
              > > I just want to know if there is any trick to drop such topic without
              > > using the administration
              > > For information for test we could have more than 100,000 topics
              > > created
              > >
              > > Thanks
              Thanks a lot
              and last question: is there any easy way to get name of my JMSServer
              without using MBean ?
              Thanks
              

  • Dynamic Topic Title

    RoboHelp 9
    I believe there is a simple solution for this problem. I need to have the Topic Title change for each page in the header of the page. I believe this is controlled in the Master Page but am unable to locate the solution to making this happen.
    If someone can direct me to another post or help page, I would appreciate. Thanks.
    DJ

    This can be achieved by using the Insert > Fields and Variables menu item inside your master page. Select the "Title" value and ensure the "Auto Update This Field option is selected (see image below). The other key thing is to ensure that the field is placed inside the body region.
      The RoboColum(n)
      @robocolumn
      Colum McAndrew

  • Support for Topics in XI JMS Adapter

    Hello Everyone,
      I am trying to configure Topics instead of queues for JMS Adapter and I am not able to exchange messages with Topics. However, when I change Topics with Queues in JMS configuration file on XI 2.0, the scenario works okay.
      Can anyone let me know if JMS adapter for XI 2.0 or XI 3.0 supports topics. If yes, then what changes should I make in order to exchange messages with Topics via JMS adapter.
    Thanks,

    Hi Lalit,
    No support for JMS topics in SAP XI 2.0 nor XI 3.0.
    I don't know why it isn't supported.  Maybe SAP wants to avoid the hassle of configuring durable subscribers.  And customers forgetting to remove durable subscriptions whereby message pile up until the JMS broker runs out of disk space.
    Kind regards, Guy Crets

  • Dynamic Queue names at JMS receiver

    HI All,
                I have a scenario where sender is an RFC and receiver is via JMS  and also get a reply back . JMS is asynchonous but as suggested in other threads it is possible to capture the response by setting some Adapter specific parameters.
                But my problem is the queue name for the response is not constant and it varies from request to request for the response. I have no clue how to achieve this , I tried searching some threads but couldn't come to a conclusion.
                Possibility of dynamic MQ queue selection in one receiver JMS channel
                help on Dynamic queue name in JMS Adapter
    Has anyone come across such a situation ? Please suggest.
    Also In one of threads it was suggested to use Java Proxy?  Please suggest a way forward in this approach too
    Regards,
    Mohan.

    > please refer the link what you provided in section 2.8 mentioned JMS Receiver communication channel will give response back,but i never tried.
    Yest because this document is applicabe for a scenario where request msg will come form sender JMS to XI and then Response will be sent back again to JMS by using receiver JMS adapter. So senario is JMS request --- R3 (via XI) --- R3 response to JMS.
    But here case is different. e.g. RFC --> PI --> JMS  and reply will get back from JMS  to RFC.  So definetly in this case response will come from sender JMS and not from receiver JMS.
    Read sec 2.8 throughly, you will come to know how to set the queue names dynamically for RECEIVER JMS Adapter.
    Regards,
    Sarvesh

Maybe you are looking for

  • Error while activating any message mapping in IR: very strange

    hi forum i m getting an error in IR while activating any messageMapping. the error is too long to be posted....i m posting a few lines of that: •     Internal error while checking object Message Mapping MM_sdptestFileToFile | http://sdzpoc.com.test/s

  • Year ending

    hi gurus plz tell me how can i close the normal posting periods and how can i open the special periods.and also plz let me know which gl are open for special periods. if any document regarding year end closing plz foreward to me  - [email protected]

  • Acrobat no longer available in Adobe Application Manager

    Hello, I have a Creative Cloud subscription. I uninstalled Acrobat and when I tried to reinstall it doesn't show in Adobe Application Manager. I'm on Windows Vista 32 bit, using CS6. All other applications show in the Application Manager. Any ideas?

  • Long in problem apple store

    hi I need help I can't get my apple store some problem with my apple App Store pleas chek thanks

  • MoveTo file renaming question

    Hi guys If you want to change the case of a file name eg... filename.txt to... FILENAME.txt (using moveTo to do this throws an error, as the file already exists) ...is there any way to do it that doesn't involve adding arbitrary characters first, or