Author |
Message
|
xgr3 |
Posted: Thu Sep 01, 2005 10:44 am Post subject: URGENT - Pub sub question |
|
|
Newbie
Joined: 27 Jul 2005 Posts: 9
|
I have a requirement in my project related to Pub-Sub.
After subscribing to Topic for message, I want to process the same message after a week. Is there a optimize way to handle this.
Please share your ideas.
Thanks
Rashid |
|
Back to top |
|
 |
jefflowrey |
Posted: Thu Sep 01, 2005 10:46 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
Can you be more explicit?
You wish to subscribe to a topic, and only get messages that are a week old?
You wish to subscribe to a topic, and then only start getting messages a week later?
Can you also think of a better way to solve your business problem... because Pub/Sub is not designed or optimized for your current requirements. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
xgr3 |
Posted: Thu Sep 01, 2005 12:10 pm Post subject: |
|
|
Newbie
Joined: 27 Jul 2005 Posts: 9
|
Thanks for the response. I hope this time it will be clear.
I have one application that publishes a specific message MSG-A to a topic TOPIC-A on 1-sep-2005.
I have one Server that runs daily and subscribes the messages from TOPIC-A.
My requirement is that I want my Server to read the Message MSG-A only on a specific future date, say 1-OCT-2005. I want to specify this date(maybe, In the Header of the Message) when I publish the Message MSG-A.
Is it somehow possible. |
|
Back to top |
|
 |
jefflowrey |
Posted: Thu Sep 01, 2005 12:49 pm Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
It is certainly possible, in a variety of ways. But most of them are not good ways.
What I would recommend is, if you have to use Pub/Sub - and you really shouldn't use it for this - is to create a publisher, and a subscriber and then your serverapp.
The subscriber will merely insert all publications into a database table.
The serverapp then will use database select statements to get the messages that are a week old.
Or, perhaps, there will be another app who's job it is to do the database selects. Then it can be the publisher, and the server app will be the subscriber, and only get messages that are a week old.
This is a really bad business requirement. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
xgr3 |
Posted: Thu Sep 01, 2005 1:09 pm Post subject: |
|
|
Newbie
Joined: 27 Jul 2005 Posts: 9
|
Hi Thanks for the prompt reply. Is there any way I can specify the date of a week later while publishing the message. and Is there a way the Subscriber uses that date to read that message only on that date. |
|
Back to top |
|
 |
jefflowrey |
Posted: Thu Sep 01, 2005 1:11 pm Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
You can put anything you want into a topic.
Using Pub/Sub to solve this problem is a bad idea. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
|