Java Code Examples for org.springframework.jms.support.QosSettings

The following examples show how to use org.springframework.jms.support.QosSettings. These examples are extracted from open source projects. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
/**
 * Send the given response message to the given destination.
 * @param response the JMS message to send
 * @param destination the JMS destination to send to
 * @param session the JMS session to operate on
 * @throws JMSException if thrown by JMS API methods
 * @see #postProcessProducer
 * @see javax.jms.Session#createProducer
 * @see javax.jms.MessageProducer#send
 */
protected void sendResponse(Session session, Destination destination, Message response) throws JMSException {
	MessageProducer producer = session.createProducer(destination);
	try {
		postProcessProducer(producer, response);
		QosSettings settings = getResponseQosSettings();
		if (settings != null) {
			producer.send(response, settings.getDeliveryMode(), settings.getPriority(),
					settings.getTimeToLive());
		}
		else {
			producer.send(response);
		}
	}
	finally {
		JmsUtils.closeMessageProducer(producer);
	}
}
 
Example 2
@Test
public void replyWithCustomTimeToLive() throws JMSException {
	Session session = mock(Session.class);
	Queue replyDestination = mock(Queue.class);
	given(session.createQueue("queueOut")).willReturn(replyDestination);

	MessageProducer messageProducer = mock(MessageProducer.class);
	TextMessage responseMessage = mock(TextMessage.class);
	given(session.createTextMessage("Response")).willReturn(responseMessage);
	given(session.createProducer(replyDestination)).willReturn(messageProducer);

	MessagingMessageListenerAdapter listener = getPayloadInstance("Response", "replyPayloadToQueue", Message.class);
	QosSettings settings = new QosSettings();
	settings.setTimeToLive(6000);
	listener.setResponseQosSettings(settings);
	listener.onMessage(mock(javax.jms.Message.class), session);
	verify(session).createQueue("queueOut");
	verify(session).createTextMessage("Response");
	verify(messageProducer).send(responseMessage, javax.jms.Message.DEFAULT_DELIVERY_MODE,
			javax.jms.Message.DEFAULT_PRIORITY, 6000);
	verify(messageProducer).close();
}
 
Example 3
@Test
public void replyWithFullQoS() throws JMSException {
	Session session = mock(Session.class);
	Queue replyDestination = mock(Queue.class);
	given(session.createQueue("queueOut")).willReturn(replyDestination);

	MessageProducer messageProducer = mock(MessageProducer.class);
	TextMessage responseMessage = mock(TextMessage.class);
	given(session.createTextMessage("Response")).willReturn(responseMessage);
	given(session.createProducer(replyDestination)).willReturn(messageProducer);

	MessagingMessageListenerAdapter listener = getPayloadInstance("Response", "replyPayloadToQueue", Message.class);
	QosSettings settings = new QosSettings(DeliveryMode.NON_PERSISTENT, 6, 6000);
	listener.setResponseQosSettings(settings);
	listener.onMessage(mock(javax.jms.Message.class), session);
	verify(session).createQueue("queueOut");
	verify(session).createTextMessage("Response");
	verify(messageProducer).send(responseMessage, DeliveryMode.NON_PERSISTENT, 6, 6000);
	verify(messageProducer).close();
}
 
Example 4
/**
 * Send the given response message to the given destination.
 * @param response the JMS message to send
 * @param destination the JMS destination to send to
 * @param session the JMS session to operate on
 * @throws JMSException if thrown by JMS API methods
 * @see #postProcessProducer
 * @see javax.jms.Session#createProducer
 * @see javax.jms.MessageProducer#send
 */
protected void sendResponse(Session session, Destination destination, Message response) throws JMSException {
	MessageProducer producer = session.createProducer(destination);
	try {
		postProcessProducer(producer, response);
		QosSettings settings = getResponseQosSettings();
		if (settings != null) {
			producer.send(response, settings.getDeliveryMode(), settings.getPriority(),
					settings.getTimeToLive());
		}
		else {
			producer.send(response);
		}
	}
	finally {
		JmsUtils.closeMessageProducer(producer);
	}
}
 
Example 5
@Test
public void replyWithCustomTimeToLive() throws JMSException {
	Session session = mock(Session.class);
	Queue replyDestination = mock(Queue.class);
	given(session.createQueue("queueOut")).willReturn(replyDestination);

	MessageProducer messageProducer = mock(MessageProducer.class);
	TextMessage responseMessage = mock(TextMessage.class);
	given(session.createTextMessage("Response")).willReturn(responseMessage);
	given(session.createProducer(replyDestination)).willReturn(messageProducer);

	MessagingMessageListenerAdapter listener = getPayloadInstance("Response", "replyPayloadToQueue", Message.class);
	QosSettings settings = new QosSettings();
	settings.setTimeToLive(6000);
	listener.setResponseQosSettings(settings);
	listener.onMessage(mock(javax.jms.Message.class), session);
	verify(session).createQueue("queueOut");
	verify(session).createTextMessage("Response");
	verify(messageProducer).send(responseMessage, javax.jms.Message.DEFAULT_DELIVERY_MODE,
			javax.jms.Message.DEFAULT_PRIORITY, 6000);
	verify(messageProducer).close();
}
 
Example 6
@Test
public void replyWithFullQoS() throws JMSException {
	Session session = mock(Session.class);
	Queue replyDestination = mock(Queue.class);
	given(session.createQueue("queueOut")).willReturn(replyDestination);

	MessageProducer messageProducer = mock(MessageProducer.class);
	TextMessage responseMessage = mock(TextMessage.class);
	given(session.createTextMessage("Response")).willReturn(responseMessage);
	given(session.createProducer(replyDestination)).willReturn(messageProducer);

	MessagingMessageListenerAdapter listener = getPayloadInstance("Response", "replyPayloadToQueue", Message.class);
	QosSettings settings = new QosSettings(DeliveryMode.NON_PERSISTENT, 6, 6000);
	listener.setResponseQosSettings(settings);
	listener.onMessage(mock(javax.jms.Message.class), session);
	verify(session).createQueue("queueOut");
	verify(session).createTextMessage("Response");
	verify(messageProducer).send(responseMessage, DeliveryMode.NON_PERSISTENT, 6, 6000);
	verify(messageProducer).close();
}
 
Example 7
/**
 * We Take the first {@link SourceDataTagValue} object from collection to determine
 * the Quality-of-Service settings for the message sending
 * @param sourceDataTagValue the first tag extracted from {@link DataTagValueUpdate}
 * @return the Quality-of-Service settings for determine the {@link JmsTemplate}
 */
static QosSettings extractQosSettings(SourceDataTagValue sourceDataTagValue) {
  QosSettings settings = new QosSettings();
  
  settings.setPriority(sourceDataTagValue.getPriority());
  settings.setTimeToLive(sourceDataTagValue.getTimeToLive());

  if (sourceDataTagValue.isGuaranteedDelivery()) {
    log.debug("\t sending PERSISTENT message");
    settings.setDeliveryMode(DeliveryMode.PERSISTENT);
  } else {
    log.debug("\t sending NON-PERSISTENT message");
    settings.setDeliveryMode(DeliveryMode.NON_PERSISTENT);
  }
  
  return settings;
}
 
Example 8
/**
 * Create new {@link SynchroBufferQueue} and start a new message dispatcher thread.
 * @param settings Quality-of-Service JMS settings
 */
private void createSynchroBufferQueue(QosSettings settings) {
  SynchroBufferQueue<SourceDataTagValue> buffer = new SynchroBufferQueue<>();
  synchroBufferMap.put(settings, buffer);
  String name = "LOW-MSG-BUFFER-";
  long timeout = daqProperties.getJms().getMaxMessageDelayPriorityLow();
  
  switch (settings.getPriority()) {
    case DataTagConstants.PRIORITY_HIGH:
      timeout = daqProperties.getJms().getMaxMessageDelayPriorityHigh();
      name = "HIGH-MSG-BUFFER-";
      break;
    case DataTagConstants.PRIORITY_MEDIUM:
      timeout = daqProperties.getJms().getMaxMessageDelayPriorityMedium();
      name = "MEDIUM-MSG-BUFFER-";
      break;
    case DataTagConstants.PRIORITY_LOW:
      timeout = daqProperties.getJms().getMaxMessageDelayPriorityLow();
      name = "LOW-MSG-BUFFER-";
      break;
    default:
      log.warn("Got unsupported JMS priority: {}. Please check the DAQ configuration. Will use PRIORITY_LOW", settings.getPriority());
      break;
  }
  startMessageConsumer(name + settings.getTimeToLive(), buffer, timeout);
}
 
Example 9
Source Project: spring-analysis-note   Source File: JmsMessageEndpointManager.java    License: MIT License 5 votes vote down vote up
@Override
@Nullable
public QosSettings getReplyQosSettings() {
	JmsActivationSpecConfig config = getActivationSpecConfig();
	if (config != null) {
		return config.getReplyQosSettings();
	}
	throw new IllegalStateException("Could not determine reply qosSettings - no activation spec config is set");
}
 
Example 10
Source Project: spring-analysis-note   Source File: MethodJmsListenerEndpoint.java    License: MIT License 5 votes vote down vote up
@Override
protected MessagingMessageListenerAdapter createMessageListener(MessageListenerContainer container) {
	Assert.state(this.messageHandlerMethodFactory != null,
			"Could not create message listener - MessageHandlerMethodFactory not set");
	MessagingMessageListenerAdapter messageListener = createMessageListenerInstance();
	Object bean = getBean();
	Method method = getMethod();
	Assert.state(bean != null && method != null, "No bean+method set on endpoint");
	InvocableHandlerMethod invocableHandlerMethod =
			this.messageHandlerMethodFactory.createInvocableHandlerMethod(bean, method);
	messageListener.setHandlerMethod(invocableHandlerMethod);
	String responseDestination = getDefaultResponseDestination();
	if (StringUtils.hasText(responseDestination)) {
		if (container.isReplyPubSubDomain()) {
			messageListener.setDefaultResponseTopicName(responseDestination);
		}
		else {
			messageListener.setDefaultResponseQueueName(responseDestination);
		}
	}
	QosSettings responseQosSettings = container.getReplyQosSettings();
	if (responseQosSettings != null) {
		messageListener.setResponseQosSettings(responseQosSettings);
	}
	MessageConverter messageConverter = container.getMessageConverter();
	if (messageConverter != null) {
		messageListener.setMessageConverter(messageConverter);
	}
	DestinationResolver destinationResolver = container.getDestinationResolver();
	if (destinationResolver != null) {
		messageListener.setDestinationResolver(destinationResolver);
	}
	return messageListener;
}
 
Example 11
@Test
public void customReplyQosSettings() {
	JmsMessageEndpointManager endpoint = new JmsMessageEndpointManager();
	JmsActivationSpecConfig config = new JmsActivationSpecConfig();
	QosSettings settings = new QosSettings(1, 3, 5);
	config.setReplyQosSettings(settings);
	endpoint.setActivationSpecConfig(config);
	assertNotNull(endpoint.getReplyQosSettings());
	assertEquals(1, endpoint.getReplyQosSettings().getDeliveryMode());
	assertEquals(3, endpoint.getReplyQosSettings().getPriority());
	assertEquals(5, endpoint.getReplyQosSettings().getTimeToLive());
}
 
Example 12
private void setDefaultJmsConfig(AbstractJmsListenerContainerFactory<?> factory) {
	factory.setConnectionFactory(this.connectionFactory);
	factory.setDestinationResolver(this.destinationResolver);
	factory.setMessageConverter(this.messageConverter);
	factory.setSessionTransacted(true);
	factory.setSessionAcknowledgeMode(Session.DUPS_OK_ACKNOWLEDGE);
	factory.setPubSubDomain(true);
	factory.setReplyPubSubDomain(true);
	factory.setReplyQosSettings(new QosSettings(1, 7, 5000));
	factory.setSubscriptionDurable(true);
	factory.setClientId("client-1234");
	factory.setAutoStartup(false);
}
 
Example 13
private void assertDefaultJmsConfig(AbstractMessageListenerContainer container) {
	assertEquals(this.connectionFactory, container.getConnectionFactory());
	assertEquals(this.destinationResolver, container.getDestinationResolver());
	assertEquals(this.messageConverter, container.getMessageConverter());
	assertEquals(true, container.isSessionTransacted());
	assertEquals(Session.DUPS_OK_ACKNOWLEDGE, container.getSessionAcknowledgeMode());
	assertEquals(true, container.isPubSubDomain());
	assertEquals(true, container.isReplyPubSubDomain());
	assertEquals(new QosSettings(1, 7, 5000), container.getReplyQosSettings());
	assertEquals(true, container.isSubscriptionDurable());
	assertEquals("client-1234", container.getClientId());
	assertEquals(false, container.isAutoStartup());
}
 
Example 14
private void setDefaultJcaConfig(DefaultJcaListenerContainerFactory factory) {
	factory.setDestinationResolver(this.destinationResolver);
	factory.setTransactionManager(this.transactionManager);
	factory.setMessageConverter(this.messageConverter);
	factory.setAcknowledgeMode(Session.DUPS_OK_ACKNOWLEDGE);
	factory.setPubSubDomain(true);
	factory.setReplyQosSettings(new QosSettings(1, 7, 5000));
	factory.setSubscriptionDurable(true);
	factory.setClientId("client-1234");
}
 
Example 15
private void assertDefaultJcaConfig(JmsMessageEndpointManager container) {
	assertEquals(this.messageConverter, container.getMessageConverter());
	assertEquals(this.destinationResolver, container.getDestinationResolver());
	JmsActivationSpecConfig config = container.getActivationSpecConfig();
	assertNotNull(config);
	assertEquals(Session.DUPS_OK_ACKNOWLEDGE, config.getAcknowledgeMode());
	assertEquals(true, config.isPubSubDomain());
	assertEquals(new QosSettings(1, 7, 5000), container.getReplyQosSettings());
	assertEquals(true, config.isSubscriptionDurable());
	assertEquals("client-1234", config.getClientId());
}
 
Example 16
@Test
public void processAndReplyWithCustomReplyQosSettings() throws JMSException {
	String methodName = "processAndReplyWithSendTo";
	SimpleMessageListenerContainer container = new SimpleMessageListenerContainer();
	QosSettings replyQosSettings = new QosSettings(1, 6, 6000);
	container.setReplyQosSettings(replyQosSettings);
	MessagingMessageListenerAdapter listener = createInstance(this.factory,
			getListenerMethod(methodName, String.class), container);
	processAndReplyWithSendTo(listener, "replyDestination", false, replyQosSettings);
	assertListenerMethodInvocation(this.sample, methodName);
}
 
Example 17
private void processAndReplyWithSendTo(MessagingMessageListenerAdapter listener,
		String replyDestinationName, boolean pubSubDomain,
		QosSettings replyQosSettings) throws JMSException {
	String body = "echo text";
	String correlationId = "link-1234";
	Destination replyDestination = new Destination() {};

	DestinationResolver destinationResolver = mock(DestinationResolver.class);
	TextMessage reply = mock(TextMessage.class);
	QueueSender queueSender = mock(QueueSender.class);
	Session session = mock(Session.class);

	given(destinationResolver.resolveDestinationName(session, replyDestinationName, pubSubDomain))
			.willReturn(replyDestination);
	given(session.createTextMessage(body)).willReturn(reply);
	given(session.createProducer(replyDestination)).willReturn(queueSender);

	listener.setDestinationResolver(destinationResolver);
	StubTextMessage inputMessage = createSimpleJmsTextMessage(body);
	inputMessage.setJMSCorrelationID(correlationId);
	listener.onMessage(inputMessage, session);

	verify(destinationResolver).resolveDestinationName(session, replyDestinationName, pubSubDomain);
	verify(reply).setJMSCorrelationID(correlationId);
	if (replyQosSettings != null) {
		verify(queueSender).send(reply, replyQosSettings.getDeliveryMode(),
				replyQosSettings.getPriority(), replyQosSettings.getTimeToLive());
	}
	else {
		verify(queueSender).send(reply);
	}
	verify(queueSender).close();
}
 
Example 18
Source Project: java-technology-stack   Source File: JmsMessageEndpointManager.java    License: MIT License 5 votes vote down vote up
@Override
@Nullable
public QosSettings getReplyQosSettings() {
	JmsActivationSpecConfig config = getActivationSpecConfig();
	if (config != null) {
		return config.getReplyQosSettings();
	}
	throw new IllegalStateException("Could not determine reply qosSettings - no activation spec config is set");
}
 
Example 19
Source Project: java-technology-stack   Source File: MethodJmsListenerEndpoint.java    License: MIT License 5 votes vote down vote up
@Override
protected MessagingMessageListenerAdapter createMessageListener(MessageListenerContainer container) {
	Assert.state(this.messageHandlerMethodFactory != null,
			"Could not create message listener - MessageHandlerMethodFactory not set");
	MessagingMessageListenerAdapter messageListener = createMessageListenerInstance();
	InvocableHandlerMethod invocableHandlerMethod =
			this.messageHandlerMethodFactory.createInvocableHandlerMethod(getBean(), getMethod());
	messageListener.setHandlerMethod(invocableHandlerMethod);
	String responseDestination = getDefaultResponseDestination();
	if (StringUtils.hasText(responseDestination)) {
		if (container.isReplyPubSubDomain()) {
			messageListener.setDefaultResponseTopicName(responseDestination);
		}
		else {
			messageListener.setDefaultResponseQueueName(responseDestination);
		}
	}
	QosSettings responseQosSettings = container.getReplyQosSettings();
	if (responseQosSettings != null) {
		messageListener.setResponseQosSettings(responseQosSettings);
	}
	MessageConverter messageConverter = container.getMessageConverter();
	if (messageConverter != null) {
		messageListener.setMessageConverter(messageConverter);
	}
	DestinationResolver destinationResolver = container.getDestinationResolver();
	if (destinationResolver != null) {
		messageListener.setDestinationResolver(destinationResolver);
	}
	return messageListener;
}
 
Example 20
@Test
public void customReplyQosSettings() {
	JmsMessageEndpointManager endpoint = new JmsMessageEndpointManager();
	JmsActivationSpecConfig config = new JmsActivationSpecConfig();
	QosSettings settings = new QosSettings(1, 3, 5);
	config.setReplyQosSettings(settings);
	endpoint.setActivationSpecConfig(config);
	assertNotNull(endpoint.getReplyQosSettings());
	assertEquals(1, endpoint.getReplyQosSettings().getDeliveryMode());
	assertEquals(3, endpoint.getReplyQosSettings().getPriority());
	assertEquals(5, endpoint.getReplyQosSettings().getTimeToLive());
}
 
Example 21
private void setDefaultJmsConfig(AbstractJmsListenerContainerFactory<?> factory) {
	factory.setConnectionFactory(this.connectionFactory);
	factory.setDestinationResolver(this.destinationResolver);
	factory.setMessageConverter(this.messageConverter);
	factory.setSessionTransacted(true);
	factory.setSessionAcknowledgeMode(Session.DUPS_OK_ACKNOWLEDGE);
	factory.setPubSubDomain(true);
	factory.setReplyPubSubDomain(true);
	factory.setReplyQosSettings(new QosSettings(1, 7, 5000));
	factory.setSubscriptionDurable(true);
	factory.setClientId("client-1234");
	factory.setAutoStartup(false);
}
 
Example 22
private void assertDefaultJmsConfig(AbstractMessageListenerContainer container) {
	assertEquals(this.connectionFactory, container.getConnectionFactory());
	assertEquals(this.destinationResolver, container.getDestinationResolver());
	assertEquals(this.messageConverter, container.getMessageConverter());
	assertEquals(true, container.isSessionTransacted());
	assertEquals(Session.DUPS_OK_ACKNOWLEDGE, container.getSessionAcknowledgeMode());
	assertEquals(true, container.isPubSubDomain());
	assertEquals(true, container.isReplyPubSubDomain());
	assertEquals(new QosSettings(1, 7, 5000), container.getReplyQosSettings());
	assertEquals(true, container.isSubscriptionDurable());
	assertEquals("client-1234", container.getClientId());
	assertEquals(false, container.isAutoStartup());
}
 
Example 23
private void setDefaultJcaConfig(DefaultJcaListenerContainerFactory factory) {
	factory.setDestinationResolver(this.destinationResolver);
	factory.setTransactionManager(this.transactionManager);
	factory.setMessageConverter(this.messageConverter);
	factory.setAcknowledgeMode(Session.DUPS_OK_ACKNOWLEDGE);
	factory.setPubSubDomain(true);
	factory.setReplyQosSettings(new QosSettings(1, 7, 5000));
	factory.setSubscriptionDurable(true);
	factory.setClientId("client-1234");
}
 
Example 24
private void assertDefaultJcaConfig(JmsMessageEndpointManager container) {
	assertEquals(this.messageConverter, container.getMessageConverter());
	assertEquals(this.destinationResolver, container.getDestinationResolver());
	JmsActivationSpecConfig config = container.getActivationSpecConfig();
	assertNotNull(config);
	assertEquals(Session.DUPS_OK_ACKNOWLEDGE, config.getAcknowledgeMode());
	assertEquals(true, config.isPubSubDomain());
	assertEquals(new QosSettings(1, 7, 5000), container.getReplyQosSettings());
	assertEquals(true, config.isSubscriptionDurable());
	assertEquals("client-1234", config.getClientId());
}
 
Example 25
@Test
public void processAndReplyWithCustomReplyQosSettings() throws JMSException {
	String methodName = "processAndReplyWithSendTo";
	SimpleMessageListenerContainer container = new SimpleMessageListenerContainer();
	QosSettings replyQosSettings = new QosSettings(1, 6, 6000);
	container.setReplyQosSettings(replyQosSettings);
	MessagingMessageListenerAdapter listener = createInstance(this.factory,
			getListenerMethod(methodName, String.class), container);
	processAndReplyWithSendTo(listener, "replyDestination", false, replyQosSettings);
	assertListenerMethodInvocation(this.sample, methodName);
}
 
Example 26
private void processAndReplyWithSendTo(MessagingMessageListenerAdapter listener,
		String replyDestinationName, boolean pubSubDomain,
		QosSettings replyQosSettings) throws JMSException {
	String body = "echo text";
	String correlationId = "link-1234";
	Destination replyDestination = new Destination() {};

	DestinationResolver destinationResolver = mock(DestinationResolver.class);
	TextMessage reply = mock(TextMessage.class);
	QueueSender queueSender = mock(QueueSender.class);
	Session session = mock(Session.class);

	given(destinationResolver.resolveDestinationName(session, replyDestinationName, pubSubDomain))
			.willReturn(replyDestination);
	given(session.createTextMessage(body)).willReturn(reply);
	given(session.createProducer(replyDestination)).willReturn(queueSender);

	listener.setDestinationResolver(destinationResolver);
	StubTextMessage inputMessage = createSimpleJmsTextMessage(body);
	inputMessage.setJMSCorrelationID(correlationId);
	listener.onMessage(inputMessage, session);

	verify(destinationResolver).resolveDestinationName(session, replyDestinationName, pubSubDomain);
	verify(reply).setJMSCorrelationID(correlationId);
	if (replyQosSettings != null) {
		verify(queueSender).send(reply, replyQosSettings.getDeliveryMode(),
				replyQosSettings.getPriority(), replyQosSettings.getTimeToLive());
	}
	else {
		verify(queueSender).send(reply);
	}
	verify(queueSender).close();
}
 
Example 27
/**
 * Creates for the given settings the JMSTemplate instance, if not yet done.
 * @param settings The Quality-of-Service settings to use
 * @return the dedicated {@link JmsTemplate} for the given settings
 */
public synchronized JmsTemplate getDataTagValueUpdateJmsTemplate(QosSettings settings) {
  if (!jmsTemplateMap.containsKey(settings)) { 
    createDataTagValueUpdateJmsTemplate(settings);
  }
  return jmsTemplateMap.get(settings);
}
 
Example 28
/**
 * Note, that the {@link JmsTemplate#setQosSettings(QosSettings)} is implicitly calling 
 * {@link JmsTemplate#setExplicitQosEnabled(boolean)}
 * @param settings the Quality of Service settings for the template 
 */
private void createDataTagValueUpdateJmsTemplate(QosSettings settings) {
  JmsTemplate jmsTemplate = new JmsTemplate(connectionFactory);
  jmsTemplate.setDefaultDestination(destination);
  jmsTemplate.setQosSettings(settings);
  jmsTemplate.setMessageConverter(new DataTagValueUpdateConverter());
  jmsTemplateMap.put(settings, jmsTemplate);
}
 
Example 29
Source Project: c2mon   Source File: ActiveJmsSender.java    License: GNU Lesser General Public License v3.0 5 votes vote down vote up
@Override
public void publish(DataTagValueUpdate dataTagValueUpdate) {
  SourceDataTagValue sdtValue = dataTagValueUpdate.getValues().iterator().next();
  QosSettings settings = QosSettingsFactory.extractQosSettings(sdtValue);
  // convert and send the collection of updates
  jmsUpdateQueueTemplateFactory.getDataTagValueUpdateJmsTemplate(settings).convertAndSend(dataTagValueUpdate);
}
 
Example 30
@Override
public final void addValue(final SourceDataTagValue dataTagValue) throws InterruptedException {
  if (dataTagValue.getPriority() == DataTagConstants.PRIORITY_HIGHEST) {
    distributeValue(dataTagValue);
  } else {
    QosSettings settings = QosSettingsFactory.extractQosSettings(dataTagValue);
    synchroBufferFactory.getSynchroBuffer(settings).put(dataTagValue);
  }
}