Hi,
I am planning to use openJMS in a critical project.=20
I have to process massive amount of messages.=20
I want to implement something as follows:=20
* I will listen a gateway and fetch all the messages coming from the=20
gateway
* push all the fetched messages in a queue. (this is a synchronous process=
=20
- I will use a blocking API to fetch messages coming from gateway)
* then I will use messageListeners to process messages in queue and send=20
the messages to appropriate services. (this is an asynchronous process)
And the questions:=20
* How can I implement more than one messageListener? (I want to bind 10=20
or more messageListeners to the queue)
* If any time, processing fails, how can I be sure that the message will=20
be redelivered? Should I use transactedSessions? I couldn't find an=20
example using transactedSessions.=20
* I want to implement a timeout mechanism. Should I depend on JMS=20
capabilities or should I use timers to implement it.=20
Here is the code fragment I used to implement sender and receiver. Could=20
you please send a link or example.=20
Initializing JMS and sending messages to queue
***************************************************************************=
****************************
JMSInitializerLogger.info("Creating JNDI context");
setContext(createJNDIContext());
=20
JMSInitializerLogger.info("Creating USSDMessageQueue");
setConnection(createQueueConnection(getContext()));
=20
JMSInitializerLogger.info("Creating session for USSDMessageQueue");
setSession(createQueueSession(getConnection()));
JMSInitializerLogger.info("Creating the queue (queue name is=20
'USSDMessageQueue')");
setQueue(createQueue(getSession(), "USSDMessageQueue"));
JMSInitializerLogger.info("Creating sender");
setSender(createSender(getSession(), getQueue()));
while(true){
try {
TextMessage message =3D session.createTextMessage("100");
sender.send(message);
}=20
...
Listening queue and processing them with onMessageMethod
***************************************************************************=
**
MessageQueueListener mql =3D new MessageQueueListener("test");
MessageQueueListener mql2 =3D new MessageQueueListener("test2");
MessageQueueListener mql3 =3D new MessageQueueListener("test3");
qrecv.setMessageListener(mql);
qrecv2.setMessageListener(mql2);
qrecv3.setMessageListener(mql3);
This doesn't work....
Any ideas?=20
Metin Zavrak
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
Yaz=FDl=FDm Geli=FEtirme M=FChendisi
VAS - SMSC=20
0 533 632 87 68
-------------------------=20
http://www.oksijen.com
-------------------------=20
The information contained in this message is confidential, intended solely =
for the use of the individual or entity to whom it is addressed and may be =
protected by professional secrecy. You should not copy, disclose or distrib=
ute this information for any purpose. If you are not the intended recipient=
of this message or you receive this mail in error, you should refrain from=
making any use of the contents and from opening any attachment. In that ca=
se, please notify the sender immediately and return the message to the send=
er, then, delete and destroy all copies. This e-mail message has been swept=
by anti-virus systems for the presence of computer viruses. In doing so, h=
owever, we cannot warrant that virus or other forms of data corruption may =
not be present and we do not take any responsibility in any occurrence.=20
Bu e-posta mesaj=FD ki=FEiye =F6zel olup, gizli bilgiler i=E7eriyor olabili=
r. E=F0er bu e-posta mesaj=FD size yanl=FD=FEl=FDkla ula=FEm=FD=FEsa, e-pos=
ta mesaj=FDn=FD kullan=FDc=FDya hemen geri g=F6nderiniz ve mesaj kutunuzdan=
siliniz. Bu e-posta mesaj=FD, hi=E7 bir =FEekilde, herhangi bir ama=E7 i=
=E7in =E7o=F0alt=FDlamaz, yay=FDnlanamaz ve para kar=FE=FDl=FD=F0=FD sat=FD=
lamaz. Yollay=FDc=FD, bu e-posta mesaj=FDn=FDn - vir=FCs koruma sistemleri =
ile kontrol ediliyor olsa bile - vir=FCs i=E7ermedi=F0ini garanti etmez ve =
meydana gelebilecek zararlardan do=F0acak hi=E7bir sorumlulu=F0u kabul etme=
z.=20
|