@Deprecated @DeprecationNotice(classNames="org.apache.nifi.jms.processors.PublishJMS", reason="This processor is deprecated and may be removed in future releases.") @Tags(value={"jms","send","put"}) @InputRequirement(value=INPUT_REQUIRED) @CapabilityDescription(value="Creates a JMS Message from the contents of a FlowFile and sends the message to a ActiveMQ JMS Server.") @SeeAlso(value={GetJMSQueue.class,GetJMSTopic.class}) public class PutJMS extends AbstractProcessor
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_MESSAGE_PRIORITY
Deprecated.
|
private Queue<WrappedMessageProducer> |
producerQueue
Deprecated.
|
private List<PropertyDescriptor> |
properties
Deprecated.
|
static Relationship |
REL_FAILURE
Deprecated.
|
static Relationship |
REL_SUCCESS
Deprecated.
|
private Set<Relationship> |
relationships
Deprecated.
|
static Charset |
UTF8
Deprecated.
|
Constructor and Description |
---|
PutJMS()
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
void |
cleanupResources()
Deprecated.
|
private void |
copyAttributesToJmsProps(FlowFile flowFile,
javax.jms.Message message)
Deprecated.
Iterates through all of the flow file's metadata and for any metadata key that starts with
jms. , the value for the corresponding key is written to the JMS message as a property. |
private javax.jms.Message |
createMessage(javax.jms.Session jmsSession,
ProcessContext context,
byte[] messageContent,
FlowFile flowFile,
javax.jms.Destination replyToQueue,
Integer priority)
Deprecated.
|
Set<Relationship> |
getRelationships()
Deprecated.
|
protected List<PropertyDescriptor> |
getSupportedPropertyDescriptors()
Deprecated.
|
void |
onTrigger(ProcessContext context,
ProcessSession session)
Deprecated.
|
onTrigger
getControllerServiceLookup, getIdentifier, getLogger, getNodeTypeProvider, init, initialize, isConfigurationRestored, isScheduled, toString, updateConfiguredRestoredTrue, updateScheduledFalse, updateScheduledTrue
customValidate, equals, getPropertyDescriptor, getPropertyDescriptors, getSupportedDynamicPropertyDescriptor, hashCode, onPropertyModified, validate
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
isStateful
getPropertyDescriptor, getPropertyDescriptors, onPropertyModified, validate
public static final Charset UTF8
public static final int DEFAULT_MESSAGE_PRIORITY
public static final Relationship REL_SUCCESS
public static final Relationship REL_FAILURE
private final Queue<WrappedMessageProducer> producerQueue
private final List<PropertyDescriptor> properties
private final Set<Relationship> relationships
protected List<PropertyDescriptor> getSupportedPropertyDescriptors()
getSupportedPropertyDescriptors
in class AbstractConfigurableComponent
public Set<Relationship> getRelationships()
getRelationships
in interface Processor
getRelationships
in class AbstractSessionFactoryProcessor
@OnStopped public void cleanupResources()
public void onTrigger(ProcessContext context, ProcessSession session) throws ProcessException
onTrigger
in class AbstractProcessor
ProcessException
private javax.jms.Message createMessage(javax.jms.Session jmsSession, ProcessContext context, byte[] messageContent, FlowFile flowFile, javax.jms.Destination replyToQueue, Integer priority) throws javax.jms.JMSException
javax.jms.JMSException
private void copyAttributesToJmsProps(FlowFile flowFile, javax.jms.Message message) throws javax.jms.JMSException
jms.
, the value for the corresponding key is written to the JMS message as a property.
The name of this property is equal to the key of the flow file's metadata minus the jms.
. For example, if the flowFile has a metadata entry:
jms.count
= 8
count
and value 8
.
If the flow file also has a metadata key with the name jms.count.type
, then the value of that metadata entry will determine the JMS property type to use for the value. For example,
if the flow file has the following properties:
jms.count
= 8
jms.count.type
= integer
message
will have an INTEGER property added with the value 8.
jms.count.type
= integer
and jms.count
= hello
, then this JMS property will not be added
to message
.flowFile
- The flow file whose metadata should be examined for JMS properties.message
- The JMS message to which we want to add properties.javax.jms.JMSException
- exCopyright © 2024 Apache NiFi Project. All rights reserved.