Jms-dequeue

From GreenVulcano Wiki
Revision as of 15:42, 5 February 2012 by Anonymous (talk) (message-selector)
Jump to: navigation, search

Description

The jms-dequeue element allows you to perform a dequeue from a JMS destination.

VulCon / GV Console Configuration

It is used by Channel and routed-dequeue.

JMS message properties are mapped to GVBuffer fields:

Field JMS
system SYSTEM
service SERVICE
id ID
retCode RET_CODE
properties p$<property name> (only GVBuffer properties with names that are valid Java identifier are managed)

If it is not defined a Data Provider, the GVBuffer object field contains the received message. Can be defined a JMS message selector to filter messages.

It has the attributes:

  • type: dequeue.
  • class: it.greenvulcano.gvesb.virtual.j2ee.JMSDequeueOperation.
  • name: Operation name. Used in the Flow section to associate workflow nodes to VCL operations.
  • connection-factory: JMS connection factory JNDI name.
  • destination-name: Destination JNDI name. Set appropriately the destination-type parameter.
  • destination-type: Destination type. Default: queue.
    The attribute's admitted values are:
    • queue
    • topic
  • transacted: Specifies whether the dequeue has to open his own transaction or fall in a global transaction.
    • 'true' open his own transaction and do not fall in the global transaction.
    • 'false' fall in the active global transaction. Must be used a XA connection factory.
This parameter is not relevant if the connection factory is not XA. Default: false.
  • acknowledge-type:In transactional dequeue acknowledgment is managed by the application server.
    This parameter is meaningful only for non-transactional dequeue and can take the following values:
    • auto-acknowledge: the acknowledgment from application server is automatically given upon delivery of the message.
    • client-acknowledge: the client must explicitly acknowledgment the message.
    • dups-ok-acknowledge: allows the JMS server to perform optimizations on the logic of acknowledgment messages, but can cause the redelivery of messages. Should only be used with systems that are tolerant to duplicated message. Default: auto-acknowledge
  • receive-type: Allows you to specify whether the receipt should be made in blocking mode, non-blocking mode, or with timeout.
    • non-blocking: is performed a non-blocking receive. If a message is already queued then it's immediately read.
      If there are no messages available then GreenVulcano® ESB throws a time-out exception.
    • timeout: is performed a timeout receive. GreenVulcano® ESB wait for the specified time. If a message is queued then it's immediately read.
      If there are no messages available then GreenVulcano® ESB throws a time-out exception.
    • blocking: the current thread blocks indefinitely until a message arrives. Use with caution.
  • receive-timeout: Time-out duration in ms. This parameter is meaningful only if receive-type is set to time out.
    If 'receive-type' is set to 'time out' and 'receive-timeout' is not defined, then is assumed a timeout of 1000 ms.
  • receive-timeout-overridable: Specifies whether the value set to 'receive-timeout' can be overwritten at runtime. Reserved for future use. The attribute's default value is: false. The attribute's admitted values are:
    • false
    • true
  • durable-subscriber: Specifies the name of the durable subscriber. Durable subscriptions provide the receipt of all messages sent to the topic, even if the subscribers are not running when the messages are sent.
  • no-local: Avoid receiving local messages. Reserved for future use. The attribute's admitted values are:
    • true
    • false
  • use-vcl-pool: Indicates whether to use connection pooling capabilities of the VCL. Set to false if the container provides pooling capabilities.

Default: true

  • invalidate-conn-on-pool-insertion: Indicates whether connections should be marked as invalid before reinsertion on the pool. Is significant only if the pooling feature is enabled. Default: false. The attribute's admitted values are:
    • false
    • true
  • ref-dp: Name of Data Provider to use. This Data Provider will receive in input a JMS Message and must return the object to be inserted in GVBuffer.
  • dump-message: If true the dequeued message is dumped on log file, at DEBUG severity level. Default false. The attribute's admitted values are:
    • true
    • false

Its subelements are:

message-selector

This element allows you to specify a selector for receiving messages. See the JMS documentation for the selector syntax.

The properties (and their types) provided by GreenVulcano® ESB for selectors are:

  • SYSTEM (String)
  • SERVICE (String)
  • ID (String)
  • RETCODE (int)

Even GVBuffer properties are present in the form of message properties.

The properties are all string and their names have the prefix $p (only GVBuffer properties with names that are valid Java identifier are managed). For example, a GVBuffer property named PROPERTY will be identified by a property name p$PROPERTY.

As GreenVulcano® ESB can in turn generate selectors, you can define how they should be combined with the selector specified by this element, see combining attribute.

The message-selector Element is used by jms-dequeue and has the following attributes:

  • combining: GreenVulcano® ESB can dynamically generate selectors. This parameter defines how the dynamicselector should be combined with the selector configured to obtain the actual selector used for reception of JMS message. Can take the following values:
    • dynamic-and-configured (DYNAMIC) AND (CONFIGURED)
    • dynamic-or-configured (DYNAMIC) OR (CONFIGURED)
    • dynamic-only DYNAMIC
    • configured-only CONFIGURED
    • configured-if-no-dynamic DYNAMIC != null ? DYNAMIC : CONFIGURED. The attribute's default value is: dynamic-and-configured.

XAHelper

The XAHelper Element is used by jms-dequeue and jms-enqueue.

Its attributes are:

  • auto-enlist: The attribute's default value is: false.
  • transaction-status: The attribute's admitted values are:
    • TMSUCCESS: default value
    • TMFAIL

and its subelements: