Also set the dispatchAsync when using connection consumers (use in MDB dispatching).

git-svn-id: https://svn.apache.org/repos/asf/incubator/activemq/trunk@386335 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Hiram R. Chirino 2006-03-16 14:11:00 +00:00
parent 85cc87a5a5
commit baab4b209e
1 changed files with 3 additions and 0 deletions

View File

@ -656,6 +656,7 @@ public class ActiveMQConnection extends DefaultTransportListener implements Conn
info.setSubcriptionName(subscriptionName); info.setSubcriptionName(subscriptionName);
info.setSelector(messageSelector); info.setSelector(messageSelector);
info.setPrefetchSize(maxMessages); info.setPrefetchSize(maxMessages);
info.setDispatchAsync(asyncDispatch);
// Allows the options on the destination to configure the consumerInfo // Allows the options on the destination to configure the consumerInfo
if( info.getDestination().getOptions()!=null ) { if( info.getDestination().getOptions()!=null ) {
@ -963,12 +964,14 @@ public class ActiveMQConnection extends DefaultTransportListener implements Conn
checkClosedOrFailed(); checkClosedOrFailed();
ensureConnectionInfoSent(); ensureConnectionInfoSent();
ConsumerId consumerId = createConsumerId(); ConsumerId consumerId = createConsumerId();
ConsumerInfo info = new ConsumerInfo(consumerId); ConsumerInfo info = new ConsumerInfo(consumerId);
info.setDestination(ActiveMQMessageTransformation.transformDestination(destination)); info.setDestination(ActiveMQMessageTransformation.transformDestination(destination));
info.setSelector(messageSelector); info.setSelector(messageSelector);
info.setPrefetchSize(maxMessages); info.setPrefetchSize(maxMessages);
info.setNoLocal(noLocal); info.setNoLocal(noLocal);
info.setDispatchAsync(asyncDispatch);
// Allows the options on the destination to configure the consumerInfo // Allows the options on the destination to configure the consumerInfo
if( info.getDestination().getOptions()!=null ) { if( info.getDestination().getOptions()!=null ) {