/** * @return a new object instance */ public DataStructure createObject() { return new ProducerInfo(); }
/** * @return a new object instance */ public DataStructure createObject() { return new ProducerInfo(); }
/** * @return a new object instance */ public DataStructure createObject() { return new ProducerInfo(); }
/** * @return a new object instance */ public DataStructure createObject() { return new ProducerInfo(); }
/** * @return a new object instance */ public DataStructure createObject() { return new ProducerInfo(); }
/** * @return a new object instance */ public DataStructure createObject() { return new ProducerInfo(); }
/** * @return a new object instance */ public DataStructure createObject() { return new ProducerInfo(); }
/** * @return a new object instance */ public DataStructure createObject() { return new ProducerInfo(); }
/** * @return a new object instance */ public DataStructure createObject() { return new ProducerInfo(); }
public ProducerInfo copy() { ProducerInfo info = new ProducerInfo(); copy(info); return info; }
/** * Re-inject into the Broker chain */ void injectMessage(ProducerBrokerExchange producerExchange, final Message messageSend) throws Exception { ProducerBrokerExchange pe = producerExchange; if (pe == null) { pe = new ProducerBrokerExchange(); ConnectionContext cc = new ConnectionContext(); cc.setBroker(this.getRoot()); pe.setConnectionContext(cc); pe.setMutable(true); pe.setProducerState(new ProducerState(new ProducerInfo())); } super.send(pe, messageSend); }
producerExchange.setMutable(true); producerExchange.setConnectionContext(context); producerExchange.setProducerState(new ProducerState(new ProducerInfo())); final ConsumerBrokerExchange consumerExchange = new ConsumerBrokerExchange(); consumerExchange.setConnectionContext(context);
protected void sendStats(ConnectionContext context, ActiveMQMapMessage msg, ActiveMQDestination replyTo) throws Exception { msg.setPersistent(false); msg.setTimestamp(System.currentTimeMillis()); msg.setPriority((byte) javax.jms.Message.DEFAULT_PRIORITY); msg.setType(AdvisorySupport.ADIVSORY_MESSAGE_TYPE); msg.setMessageId(new MessageId(this.advisoryProducerId, this.messageIdGenerator.getNextSequenceId())); msg.setDestination(replyTo); msg.setResponseRequired(false); msg.setProducerId(this.advisoryProducerId); boolean originalFlowControl = context.isProducerFlowControl(); final ProducerBrokerExchange producerExchange = new ProducerBrokerExchange(); producerExchange.setConnectionContext(context); producerExchange.setMutable(true); producerExchange.setProducerState(new ProducerState(new ProducerInfo())); try { context.setProducerFlowControl(false); this.next.send(producerExchange, msg); } finally { context.setProducerFlowControl(originalFlowControl); } }
protected ActiveMQMessageProducer(ActiveMQSession session, ProducerId producerId, ActiveMQDestination destination, int sendTimeout) throws JMSException { super(session); this.info = new ProducerInfo(producerId); this.info.setWindowSize(session.connection.getProducerWindowSize());
producerExchange.setConnectionContext(context); producerExchange.setMutable(true); producerExchange.setProducerState(new ProducerState(new ProducerInfo())); try { context.setProducerFlowControl(false);
private void scheduleRedelivery(ConnectionContext context, MessageReference messageReference, long delay, int redeliveryCount) throws Exception { if (LOG.isTraceEnabled()) { Destination regionDestination = (Destination) messageReference.getRegionDestination(); LOG.trace("redelivery #{} of: {} with delay: {}, dest: {}", new Object[]{ redeliveryCount, messageReference.getMessageId(), delay, regionDestination.getActiveMQDestination() }); } final Message old = messageReference.getMessage(); Message message = old.copy(); message.setTransactionId(null); message.setMemoryUsage(null); message.removeProperty(ScheduledMessage.AMQ_SCHEDULED_ID); message.setProperty(REDELIVERY_DELAY, delay); message.setProperty(ScheduledMessage.AMQ_SCHEDULED_DELAY, delay); message.setRedeliveryCounter(redeliveryCount); boolean originalFlowControl = context.isProducerFlowControl(); try { context.setProducerFlowControl(false); ProducerInfo info = new ProducerInfo(); ProducerState state = new ProducerState(info); ProducerBrokerExchange producerExchange = new ProducerBrokerExchange(); producerExchange.setProducerState(state); producerExchange.setMutable(true); producerExchange.setConnectionContext(context); context.getBroker().send(producerExchange, message); } finally { context.setProducerFlowControl(originalFlowControl); } }
producerExchange.setMutable(false); producerExchange.setConnectionContext(context); producerExchange.setProducerState(new ProducerState(new ProducerInfo())); context.getBroker().send(producerExchange, message); } finally {
producerExchange.setConnectionContext(context); producerExchange.setMutable(true); producerExchange.setProducerState(new ProducerState(new ProducerInfo())); try { context.setProducerFlowControl(false);
public static void doResend(final ConnectionContext context, Message originalMessage, ActiveMQDestination deadLetterDestination, boolean copy) throws Exception { Message message = copy ? originalMessage.copy() : originalMessage; message.setOriginalDestination(message.getDestination()); message.setOriginalTransactionId(message.getTransactionId()); message.setDestination(deadLetterDestination); message.setTransactionId(null); message.setMemoryUsage(null); message.setRedeliveryCounter(0); message.getMessageId().setDataLocator(null); boolean originalFlowControl = context.isProducerFlowControl(); try { context.setProducerFlowControl(false); ProducerInfo info = new ProducerInfo(); ProducerState state = new ProducerState(info); ProducerBrokerExchange producerExchange = new ProducerBrokerExchange(); producerExchange.setProducerState(state); producerExchange.setMutable(true); producerExchange.setConnectionContext(context); context.getBroker().send(producerExchange, message); } finally { context.setProducerFlowControl(originalFlowControl); } }
localBroker.oneway(queueConsumerInfo); producerInfo = new ProducerInfo(sessionInfo, 1); producerInfo.setResponseRequired(false); remoteBroker.oneway(producerInfo);