@Tags(value={"jms","get","message","receive","consume"}) @InputRequirement(value=INPUT_FORBIDDEN) @CapabilityDescription(value="Consumes JMS Message of type BytesMessage or TextMessage transforming its content to a FlowFile and transitioning it to \'success\' relationship. JMS attributes such as headers and properties will be copied as FlowFile attributes.") @WritesAttribute(attribute="jms_deliveryMode",description="The JMSDeliveryMode from the message header.") @WritesAttribute(attribute="jms_expiration",description="The JMSExpiration from the message header.") @WritesAttribute(attribute="jms_priority",description="The JMSPriority from the message header.") @WritesAttribute(attribute="jms_redelivered",description="The JMSRedelivered from the message header.") @WritesAttribute(attribute="jms_timestamp",description="The JMSTimestamp from the message header.") @WritesAttribute(attribute="jms_correlationId",description="The JMSCorrelationID from the message header.") @WritesAttribute(attribute="jms_messageId",description="The JMSMessageID from the message header.") @WritesAttribute(attribute="jms_type",description="The JMSType from the message header.") @WritesAttribute(attribute="jms_replyTo",description="The JMSReplyTo from the message header.") @WritesAttribute(attribute="jms_destination",description="The JMSDestination from the message header.") @WritesAttribute(attribute="other attributes",description="Each message property is written to an attribute.") @SeeAlso(value={PublishJMS.class,JMSConnectionFactoryProvider.class}) public class ConsumeJMS extends AbstractJMSProcessor<JMSConsumer>
AbstractJMSProcessor.onTrigger(ProcessContext, ProcessSession) method will construct a
FlowFile containing the body of the consumed JMS message and JMS
properties that came with message which are added to a FlowFile as
attributes.| Modifier and Type | Field and Description |
|---|---|
(package private) static PropertyDescriptor |
ACKNOWLEDGEMENT_MODE |
(package private) static AllowableValue |
AUTO_ACK |
(package private) static AllowableValue |
CLIENT_ACK |
(package private) static AllowableValue |
DUPS_OK |
(package private) static PropertyDescriptor |
DURABLE_SUBSCRIBER |
static String |
JMS_SOURCE_DESTINATION_NAME |
static Relationship |
REL_SUCCESS |
private static Set<Relationship> |
relationships |
(package private) static PropertyDescriptor |
SHARED_SUBSCRIBER |
(package private) static PropertyDescriptor |
SUBSCRIPTION_NAME |
private static List<PropertyDescriptor> |
thisPropertyDescriptors |
(package private) static PropertyDescriptor |
TIMEOUT |
BYTES_MESSAGE, CF_SERVICE, CHARSET, CLIENT_ID, DESTINATION, DESTINATION_TYPE, MESSAGE_BODY, PASSWORD, propertyDescriptors, QUEUE, SESSION_CACHE_SIZE, TEXT_MESSAGE, TOPIC, USER| Constructor and Description |
|---|
ConsumeJMS() |
| Modifier and Type | Method and Description |
|---|---|
protected JMSConsumer |
finishBuildingJmsWorker(org.springframework.jms.connection.CachingConnectionFactory connectionFactory,
org.springframework.jms.core.JmsTemplate jmsTemplate,
ProcessContext processContext)
Will create an instance of
JMSConsumer |
Set<Relationship> |
getRelationships() |
protected List<PropertyDescriptor> |
getSupportedPropertyDescriptors() |
protected void |
rendezvousWithJms(ProcessContext context,
ProcessSession processSession,
JMSConsumer consumer)
Will construct a
FlowFile containing the body of the consumed JMS
message (if JMSConsumer.JMSResponse returned by JMSConsumer is not
null) and JMS properties that came with message which are added to a
FlowFile as attributes, transferring FlowFile to
'success' Relationship. |
private FlowFile |
updateFlowFileAttributesWithJMSAttributes(Map<String,String> jmsAttributes,
FlowFile flowFile,
ProcessSession processSession)
Copies JMS attributes (i.e., headers and properties) as FF attributes.
|
close, onTrigger, setupWorkerPoolonTriggergetControllerServiceLookup, getIdentifier, getLogger, getNodeTypeProvider, init, initialize, isConfigurationRestored, isScheduled, toString, updateConfiguredRestoredTrue, updateScheduledFalse, updateScheduledTruecustomValidate, equals, getPropertyDescriptor, getPropertyDescriptors, getSupportedDynamicPropertyDescriptor, hashCode, onPropertyModified, validateclone, finalize, getClass, notify, notifyAll, wait, wait, waitgetPropertyDescriptor, getPropertyDescriptors, onPropertyModified, validatestatic final AllowableValue AUTO_ACK
static final AllowableValue CLIENT_ACK
static final AllowableValue DUPS_OK
public static final String JMS_SOURCE_DESTINATION_NAME
static final PropertyDescriptor ACKNOWLEDGEMENT_MODE
static final PropertyDescriptor DURABLE_SUBSCRIBER
static final PropertyDescriptor SHARED_SUBSCRIBER
static final PropertyDescriptor SUBSCRIPTION_NAME
static final PropertyDescriptor TIMEOUT
public static final Relationship REL_SUCCESS
private static final Set<Relationship> relationships
private static final List<PropertyDescriptor> thisPropertyDescriptors
protected void rendezvousWithJms(ProcessContext context, ProcessSession processSession, JMSConsumer consumer) throws ProcessException
FlowFile containing the body of the consumed JMS
message (if JMSConsumer.JMSResponse returned by JMSConsumer is not
null) and JMS properties that came with message which are added to a
FlowFile as attributes, transferring FlowFile to
'success' Relationship.rendezvousWithJms in class AbstractJMSProcessor<JMSConsumer>ProcessExceptionprotected JMSConsumer finishBuildingJmsWorker(org.springframework.jms.connection.CachingConnectionFactory connectionFactory, org.springframework.jms.core.JmsTemplate jmsTemplate, ProcessContext processContext)
JMSConsumerfinishBuildingJmsWorker in class AbstractJMSProcessor<JMSConsumer>JMSPublisher,
JMSConsumerpublic Set<Relationship> getRelationships()
getRelationships in interface ProcessorgetRelationships in class AbstractSessionFactoryProcessorprotected List<PropertyDescriptor> getSupportedPropertyDescriptors()
getSupportedPropertyDescriptors in class AbstractJMSProcessor<JMSConsumer>private FlowFile updateFlowFileAttributesWithJMSAttributes(Map<String,String> jmsAttributes, FlowFile flowFile, ProcessSession processSession)
Copyright © 2019 Apache NiFi Project. All rights reserved.