How long should the subscriber wait ?

I am new to JMS pub/sub. I have read a number of samples. Most of them shows the subscriber uses the onMessage method to wait for publications on the topic that they subscribed to. My understanding is this will wait for ever. My questions is if the subscriber does not specify any expiry for its subscription, it will be active forever. Is there a way for the subscriber to know that the publisher will never publish the topic again or it has been deregistered by the broker due to whatever reason so that it can react to the condition instead of wating forever ? If there is a best practice, will the practice be different between a durable subscriber and a non durable subscriber ?

The durable and non-durable cases are kinda similar - in both a JVM starts up and a subscriber is created for the lifetime of the JVM unless the code decides to terminate the subscription.
Typically all JMS clients work like that; a consumer is started and usually used until the JVM closes or some event occurs so that the client closest the subscription.
There's not usually a big cost with keeping open a subscription. One of the wins of keeping a subscription open is that it can handle the producer coming and going; things remain loosely coupled.
If you really want to know when a producer starts/stops most JMS providers support advisory messages which you can watch to see when things start/stop.
http://incubator.apache.org/activemq/Advisory+Message
Though with advisories you need to keep a subscription open to watch for a new producer starting, so in the grand scheme of things you don't gain that much, unless you are talking about lots of different subscriptions within the same JVM.
James
http://logicblaze.com/
Open Source SOA

Similar Messages

  • TA44686 how long should the disconnect message display

    I connected my ipod to my computer and the do not disconnect message doesn't go away. How long should the message show

    Mine took about an hour or so but it mostly depends on your modem and processor speeds. You can check the progress by clicking your iphone on the left and then checking the download progress. As long as that is moving I would just leave it and wait but don't let your computer shut down.

  • HT5262 How long should the icloud back up take?

    How long should the iCloud back up take? I only have 4gb of storage but it has taken almost an hour already with approximately 2 hours remaining. 

    Hi RMaskery14,
    If you are concerned about the time your iCloud backup is taking, you may find the following article helpful:
    My backup is taking a long time to finish.
    Backing up and restoring takes time, especially if you have a lot of data or a slow connection. Depending on the size of your backup and the speed of your network, you may need more time than expected to complete the process. Using a reliable connection when backing up your device is highly recommended.
    iCloud: Troubleshooting creating an iCloud backup
    http://support.apple.com/kb/ts3992
    Regards,
    - Brenden

  • How long should the Mac Book pro hold its charge???

    How long should the Mac Book pro hold a  battery charge??

    For a single use or how long will the battery last until it needs to be replaced?  For single use, it depends on what you are doing when using you mac.  I find that when using mine I get about 6-6 1/2 hours just using it to browse the internet before I need to recharge it.  If it is one of the newer Macbook Pros that claim to have a 7 hour battery life, It can last up to 5 years.  See this article on notebook batteries to get the most out of your battery: http://www.apple.com/batteries/notebooks.html.  Hope this helps

  • Ipodtouch 4th gen on backorder, how long is the estamated wait

    Hey I recently went online and got a 4th gen iPod touch white, 64gb and it's. Back order...iv been waiting about...a week now so I wanted to know how long is the usual wait for any of you you may have had a similar experiance

    Ask whomever you purchased from.

  • HT4796 how long should the migration take

    how long should the PC to Mac migration take

    Welcome to Apple Support Communities
    It depends on the amount of files you are transferring and the method you are using to transfer your files (Wi-Fi or Ethernet). Both methods are slow and migration would take hours if you need to transfer a lot of files.
    I only recommend you to use Windows Migration Assistant if you need to transfer a small amount of files. If not, it is much better to copy your files to an external drive and transfer them to your Mac

  • How long should the download take.

    How long should the Lion download from the app store?

    How fast is your Internet connection when downloading other large files?

  • How long should the installation of new software for iphone take.  Mine has been downloading now for over 3 hours.  I don't want to disconnect and lose my data.

    How long should it take to update an I 4 phone to the new system.  Mine has been going for 3.5 hours and is not finished, but I don't want to disconnect and lose my data.

    Mine took about an hour or so but it mostly depends on your modem and processor speeds. You can check the progress by clicking your iphone on the left and then checking the download progress. As long as that is moving I would just leave it and wait but don't let your computer shut down.

  • How long should the download for Maverick take?

    I am updating to Mavericks and the download is going on for quite a while.  Since there is no progress bar (only the button which says "Downloading"), I am not sure if anything is happening.  How long should I wait?
    Thanks

    It's almost 6 GB, and the download speed depends on your broadband connection. If you open LaunchPad, or look in the Applications folder for the installer, there will be a progress bar you can watch to see the status of the download.

  • How long should the upgrade from 10.4.11 to 10.6.3 take?

    Subject line asks my question. How long should I expect the upgrade to take, using the Snow Leopard DVD I just purchased from Apple Store?
    Thanks
    Paul

    20-30 minutes is the norm.

  • HT4796 How long should the migration process last?

    I am trying to do a migration from my PC to my new Mac.  How long should this process take?  Mine has been running for at least six hours now and still has not completed.  Is this normal?

    Welcome to Apple Support Communities
    It depends on the amount of files you are transferring and the method you are using to transfer your files (Wi-Fi or Ethernet). Both methods are slow and migration would take hours if you need to transfer a lot of files.
    I only recommend you to use Windows Migration Assistant if you need to transfer a small amount of files. If not, it is much better to copy your files to an external drive and transfer them to your Mac

  • HT204655 how long should the update and subsequent uploading take (to start)?

    I am trying to upload my photos to photo (icloud) from my old macbook pro (2010) and it has been over 24 hours since i started and it is still showing 'updating...'?
    How long should this take? I have tried the usual - restart photo; restart mac; turn off and on icloud upload.
    the file is about 9000 iphone photos and 100 short videos.
    Thanks for any help.
    J

    How long is a piece of string?
    Essentially it should not take too long (in my experience 20 minutes max from start to finish) although there are many, many factors that can affect the time taken to download and install the upgrade. Namely the reliability of your broadband connection, reliability of your router/firewall; reliability of the wireless connection (assuming you connect to your router wirelessly); downstream bandwidth supplied to your location by your ISP; the 'health' of your iMac; how much disk space for example? This is not an exhaustive list by any means.
    If it's any help I would try the wired connection (ethernet) rather than wireless, I would log into your router's interface and double-check it's maintaining a good connection - if necessary reboot the router and try the upgrade again. Try and make sure there's only you using it at the time you do the upgrade.

  • How long should the battery last while surfing the web?

    I'm curious to know how long the battery on my Macbook should last when just surfing the web and downloading music and videos. I'm getting about 3 hours, I have a feeling it should be a lot longer. I don't have the brightness all the way up and I dim the illuminated keys.

    It really depends on your configuration and what you are doing on the web.
    If you have minimum RAM, the HDD will be accessed more often, causing heat which causes the fan to come on more often, which uses up power.
    While I watch youtube and other forms of streaming video, my fans are usually on, so my battery life is less.
    While cruising these boards and such, my battery lasts twice as long as streaming.
    3 hrs while downloading music and videos is not a bad figure.
    What you might want to do is watch a 2 hour movie and document the amount of time you get from the battery.
    Do the same while streaming a movie.
    Do some typing and or general surfing sans streaming type stuff.
    The above spans a different range of CPU and graphics usage.
    Then post back your times here. You will get a better indication of battery condition.
    Also, post back with how much RAM you have.
    Adam
    Message was edited by: Adam White

  • How long should the Apple Hardware Test (AHT) run?

    II'm running the AHT on a 2012 quad core i5 iMac 16gb/3TB .....the progress bar moved quickly to about 7/8 done, about 4 minutes, but now has been sitting there for 40 minutes.
    can anyone provide experience or input as to how long I should expect it to sit there?
    thanks

    If you run AHT in extended mode it can take over an hour to run, one factor is the HD capacity.

  • How long should the MBP battery last?

    HI, I have had my MBP 17inch for a few months now and its seems that the battery is rubbish! I generally get about 2-2.5 hours out of it, even when just surfing the internet. I calibrate it regularly, dim the brightness, turn off aiport etc.
    Its says on the webiste I should get 5.75 hours! How long does other people's last? I was wondering if it had anything to do that I have the Hi Res version 1920-by-1200. Would it use more power?
    Thanks very much for any info.
    Ian

    Use the iStat widget, not CoconutBattery. FYI, the "real" values should be checked in Utilites > System Profiler > Power.
    Your "original capacity" is 6300 mAh. That's a nominal value, which is why yours is actually higher - new batteries range from 6200 - 6700 mAh, approximately. The 5500 mAh is the correct value for the 15" MBP - CoconutBattery can't tell the difference.
    Be sure to properly calibrate your battery every couple of months.
    RE your original post, 2.5-3.5 hours of battery life is normal, depending mostly on screen brightness.
    Hope this helps...

Maybe you are looking for

  • Recommended LCD monitor for Mac Minin 1.42

    I'm trying to find a LCD monitor in the 20"-22" range for my Mac Mini 1.42 that is known to work out of the box using DVI without having to tweak things (i.e. SwitchResX). I have already purchased and returned a HP w2007. My next choice was a ViewSon

  • The Windows support software is not available.

    This error message appears when I try to download the windows support software. What do I do?

  • Deploy JSP with Tomcat

    I've been going through this painful process to deploy a simple JSP application on a Red Hat Linux 6.1 system with the latest Tomcat release. I got the Tomcat server running and all their sample JSP apps work. This system also contains the database,

  • Is there a multitasking bar in iPod touch 2nd gen?

    I've got the latest software update I can get with this device

  • Layer suddenly gets broken in GL CS2

    GL is behaving really buggy on my MacPro (OS 10.4.11). I have a page with only one layer. I've set up a dhtml timeline and everything is working fine. Until I close that page or GL crashes. When I reopen the page the layer in the layer inspector pale