문제

I don't want to block the message consumer with a receiver timeout, because as I understand it this "ties up" a thread in the queue server pool (and we have multiple queues configured). So how can I delay the message from being sent without a custom thread (the work is being performed by an EJB 2 session bean)? If it helps, JBoss Messaging 1.x is the provider.

도움이 되었습니까?

해결책

Scheduled delivery is a feature of JBoss Messaging...

long now = System.currentTimeMillis(); 
Message msg =
sess.createMessage();  
msg.setLongProperty(JBossMessage.JMS_JBOSS_SCHEDULED_DELIVERY_PROP_NAME, now + 1000 * 60 * 60 * 2); 
prod.send(msg);
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top