This section discusses the following topics.
Note: If your application is running with the UM configuration option, request_tcp_bind_request_port set to zero, request port binding has been turned off, which also disables UMP .
Sources, receivers, and stores in UMP interact in very controlled ways. This section illustrates the flow of network traffic between the components during three modes of operation and also provides a reference of UMP Events.
Figure 5 illustrates network flow during the Registration process.
Sources and receivers unicast registrations to the store. The store unicasts responses back to the sources and receivers. Registrations are on a per topic per source basis. Stores use RegIDs to identify sources and receivers. After registration, receivers may handle recovery, sources may send data, and receivers may send acknowledgements
Figure 6 illustrates the normal operation of data reception and acknowledgement and also shows how UMP attains Parallel Persistence®. The source sends message data to receivers and stores in parallel.
Sources transmit data to receivers and stores at the same time over UM multicast or unicast transport protocols.
As the store receives and persists messages, the store unicasts acknowledgements, (message stability control messages), to the source letting it know of successful reception and storage.
As receivers process and consume messages they unicast acknowledgments to the store letting the store know of successful consumption of data.
If the source desires delivery confirmation, the receiver unicasts acknowledgements directly to the source letting the source know of message consumption as well.
Normal operation and recovery can proceed at the same time. In addition, as a receiver consumes retransmitted messages, the receiver sends normal acknowledgements for consumption and confirmed delivery (if requested by the source).
Note: A store can be configured with different storage limits for each repository. If the repository reaches this limit, the repository releases the oldest message in order to persist a new message. This behavior occurs for a memory repository as well as a disk repository. If a repository releases a message that one or more receivers have not consumed (sent a consumption notification), the repository logs a single warning message in the store log file per receiver per registration.
UMP supports a flight size mechanism that tracks messages in flight from a particular source and responds when a send would exceed the configured flight size ( ume_flight_size and/or ume_flight_size_bytes). You can configure ume_flight_size_behavior to either:
block any sends that would exceed the flight size or,
allow the sends while notifying your application.
UMP considers a sent message in flight until the following two conditions are met.
The source receives the configured number of stability acknowledgements from the store(s).
The source has received the configured number of delivery confirmation notifications. (See ume_retention_unique_confirmations.)
If configuring both ume_flight_size and ume_flight_size_behavior, UMP uses the smaller of the two flight sizes on a per send basis.
ume_flight_size | ume_flight_size_bytes | Result |
---|---|---|
Exceeded | Exceeded | ume_flight_size_behavior executes |
Exceeded | Not Exceeded | ume_flight_size_behavior executes |
Not Exceeded | Exceeded | ume_flight_size_behavior executes |
Not Exceeded | Not Exceeded | No flight size sending restriction |
When using stores in a Quorum/Consensus configuration, intragroup and intergroup stability settings affect whether UMP considers a messages in flight. Consider a case with three stores in a single QC group, and two receivers. Given the default configuration, until a source receives a stability notification from two of the three stores, UMP considers a given message in-flight. In addition, if you set ume_retention_unique_confirmations to 2, that same message would be considered in flight until the source receives two stability notifications AND two delivery confirmation notifications. See also Sources Using Quorum/Consensus Store Configuration.
Note: The UMP flight size mechanism operates on a per message basis, not a per fragment basis.
Note: The UMP flight size bytes mechanism operates with only payload data. UM or network overhead is not included in the byte count.
By default, when a source sends a message that exceeds it's flight size, the call to send blocks. For example, suppose the flight size is set to 1. The first send completes but before the source receives a stability notification or delivery confirmation, it initiates a second call to send. If the source uses a blocking send, the send call blocks until the first message stabilizes. If the source uses a non-blocking send, the send returns an LBM_EWOULD_BLOCK.
Alternatively, ume_flight_size_behavior can be set to notify your application when a message send surpasses the flight size. A send that exceeds the configured flight size succeeds and also triggers a flight size notification, indicating that the flight size has been surpassed. Once the number of in-flight messages falls below the configured flight size, another flight size notification source event is triggered, this time, informing the application that the number of in-flight messages is below the source's flight size.
Figure 7 illustrates receiver recovery.
Receivers unicast retransmission requests. If the store has the message, it unicasts the retransmission to the receiver. If it does not have the message and is configured to forward the request to the source (See retransmission-request-forwarding in Options for a Topic's ume-attributes Element), it unicasts the retransmission request to the source. If the source has the message, it unicasts the retransmission directly to the receiver.
UM sends retransmissions from a thread separate from the main context thread so as not to impede live message data processing. The <store> configuration option, retransmission-request-processing-rate, sets the store's capacity to process retransmission requests. The retransmission thread processes requests off a retransmission queue which is set at 4 times the size of retransmission-request-processing-rate. The following UM Web Monitor statistics record retransmission activity. See UM Web Monitor Store Page.
Retransmission requests received rate
Retransmission requests served rate
Retransmission requests dropped rate
Total retransmission requests dropped since store startup
Receiver-paced Persistence (RPP) refers to different message retention behavior for designated receivers. You enable RPP with UM configuration options. No special API calls are needed. RPP differs from UMP's default source-paced persistence in the following ways.
The repository must be configured to allow RPP and sources and receivers must be configured to request RPP behavior during registration.
Sources can modify specific repository configuration options that pertain to RPP.
The repository retains RPP messages until all RPP receivers acknowledge consumption. The repository maintains an accurate count of all RPP receivers.
Late Joining receivers cannot receive all previously sent topic messages, only those unconsumed by all RPP receivers. Late Joining receivers can always start at the current message retained by the repository, defined as the earliest message not consumed by all RPP receivers.
Sources must also configure their flight size in bytes, and optionally, in message count. By using a total bytes flight size, the store can keep track of exactly how must space it has available and not send stability acknowledgements if new messages would exceed the available space, which would endanger the receipt of all messages by all RPP receivers. See UMP Flight Size.
In addition, a disk write delay interval for the repository, available for Source-paced Persistence as well, improves performance by preventing unnecessary disk activity.
This section discusses the following topics.
If a source sets ume_receiver_paced_persistence, its topic becomes a RPP topic. When the source registers with the store, the source's repository also becomes a RPP repository. Receivers registering with a store on the RPP topic become RPP receivers.
A source registration request includes the following.
Designation of a RPP topic (LBMC_UME_PREG_FLAG_REGISTER flag)
Reconfigured repository configuration option values. Possible options are the 3 repository size options, repository-allow-ack-on-reception, repository-disk-write-delay and source-flight-size-bytes-maximum.
Re-registration must request same configuration options or the store rejects the request.
Receiver registration request includes its designation as a RPP receiver (LBMC_UME_PREG_FLAG_REGISTER flag).
The repository's registration response to both a source and a receiver acknowledges RPP mode.
Late joining receivers that register after the first RPP topic message has been sent cannot receive any messages sent prior to their registration, except for messages not yet consumed by all RPP receivers. This behavior also applies to the very first receiver of a RPP group that registers after the source sends the first message. Any messages published prior to RPP receiver registration are not available for recovery.
Should a registered receiver's activity timer expire and be declared by the repository to be inactive, the repository retains all messages published since the receiver's last acknowledged message (or initial sequence number if no messages were acknowledged) until its receiver state lifetime expires and the repository deletes the receiver state information. Deleting receiver state removes all knowledge of the receiver from the repository. As a result, the repository also deletes all messages being held solely for this receiver.
Should an early exiting receiver reregister (or otherwise become active) before the expiration of its state lifetime, that receiver can recover all messages retained for that receiver.
The following table indicates the result of registration requests across UMP versions.
Version/Object | Pre-ver. 5.3 Store | Ver. 5.3 RPP Store | Ver. 5.3 Non-RPP Store |
---|---|---|---|
Pre 5.3 Source | Granted | Rejected * | Granted * |
5.3 RPP Source | Granted - Source Error | Granted * | Rejected * |
5.3 Non-RPP Source | Granted | Rejected * | Granted * |
Pre 5.3 Receiver | Granted | Rejected | Granted |
5.3 RPP Receiver | Granted - Receiver Error | Granted | Rejected |
5.3 Non-RPP Receiver | Granted | Rejected | Granted |
Granted - Source Error indicates that the store granted the registration but the source detected that RPP behavior was not acknowledged by the store.
Granted - Receiver Error indicates that the store granted the registration but the receiver detected that RPP behavior was not acknowledged by the store.
* Refers only to the re-registration of a source with an existing source repository because the source determines the repository's behavior for new registrations.
Since all RPP receivers must receive all messages, message overruns at the store or receiver must be prevented by regulating the sending pace of the source. The store uses the source's flight size (bytes) to regulate the source's speed, by withholding stability acknowledgements if the repository does not have at least one flight size available.
Sources transmit data to receivers and store repositories at the same time over UM multicast or unicast transport protocols.
When a disk repository receives a message, it holds the message in memory cache before it writes the message to disk. The repository sends a stability notification to the source after it writes the message to disk. Memory repositories send the stability notice upon reception. See also Acknowledge on Reception and Receiver Acknowledgement and Flight Size below.
If the source desires delivery confirmation, receivers unicast acknowledgements directly to the source letting the source know of message consumption as well.
The following also affect when a repository sends a stability acknowledgement to the source.
Acknowledge on Reception - If you configure the repository for repository-allow-ack-on-reception and the source also sets ume_repository_ack_on_reception, the repository sends a stability acknowledgement to the source immediately upon reception. If the disk write has not already been initiated, UMP does not write the message to disk.
Receiver Acknowledgement - If a repository receives acknowledgements from all receivers before writing the message to disk, it immediately sends a stability acknowledgement to the source. If the disk write has not already been initiated, UMP does not write the message to disk.
Write Delay - The repository option, repository-disk-write-delay, allows the repository to hold messages in memory cache longer before persisting them to disk. This delay increases the probability that all RPP receivers acknowledge message consumption, eliminating the need to persist the message to disk.
Flight size - A disk repository only sends stability acknowledgement to the source if its memory cache has at least one flight size (in both messages and bytes) available. A memory repository also sends stability acknowledgement if it has at least one flight size (in both messages and bytes) available. A lack of available space in the repository blocks the source until the repository reclaims the necessary storage space and sends a stability acknowledgement.
For memory store repositories, the behaviors Acknowledge on Reception, Receiver Acknowledgement and Write Delay do not apply.
An RPP source repository retains messages until all RPP receivers acknowledge receipt of the message. Therefore an RPP receiver can only recover messages that have not been consumed by all RPP receivers. It is important to note that an RPP receiver joining after other RPP receivers have already joined and after messages have already been sent can only be guaranteed to recover messages sent subsequent to its joining.
You can deregister either sources or receivers using deregistration APIs, (lbm_src_ume_deregistration()
, lbm_rcv_ume_deregistration()
and lbm_wrcv_ume_deregistration()
). UM
deletes the state of deregistered objects. If you deregister a RPP receiver, UMP automatically updates the number of receiver acknowledgements
required to maintain RPP behavior. The store issues Deregistration Successful events for
every source or receiver that deregisters. See UMP and UMQ
Events.
Applications should be cautious about using the deregistration APIs to deregister RPP sources or receivers. These APIs can be disruptive to RPP.
lbm_src_ume_deregistration()
also deletes any persisted
RPP messages in the source's repository. A source application should only use lbm_src_ume_deregistration()
if it uses delivery confirmation
from the receiver and it knows all messages have been delivered. The source is blocked
after deregistering and and must restart in order to register again with the RPP
store.
Deregistering an RPP receiver with lbm_rcv_ume_deregistration()
removes the receiver from the list
of RPP receivers maintained by the repository. It is no longer part of the persistence
operation, but is a valid UM receiver, able to receive
messages, but unable to acknowledge message consumption to the repository. Any messages
not yet confirmed for that receiver are unrecoverable. The receiver must restart in order
to register again with the RPP repository.
Deregistering an RPP wildcard receiver with lbm_wrcv_ume_deregistration()
deregisters all individual topic
receivers receiving messages on topics that match the wildcard pattern. Individual topic
receivers can still receive messages after deregistering, but cannot acknowledge message
consumption. The wildcard receiver must restart in order to register again with the RPP
store.
Follow the procedure below to configure Receiver-paced Persistence.
Set ume_receiver_paced_persistence for sources and
receivers in a UM configuration file. If only certain sources
or receivers in a context are RPP, use lbm_*setopt()
l in
the source or receiver application or use Ultra Messaging® Manager to
specify RPP in an UM XML configuration file.
Set repository-allow-receiver-paced-persistence = 1 for the repository in the umestored XML configuration file.
Coordinate ume_flight_size_bytes between the repository and the source. Set the maximum flight size with the repository option, source-flight-size-bytes-maximum. Sources can reconfigure the repository's source-flight-size-bytes-maximum to a value less than or equal to the maximum.
Optional. Coordinate the ume_repository_ack_on_reception between the repository and the source. If the repository has repository-allow-ack-on-reception enabled (1), the source can choose to keep it enabled or turn it off ( ume_repository_ack_on_reception = 0). If the repository has repository-allow-ack-on-reception disabled (0), the source cannot turn it on.
Optional. If the repository is a disk repository (repository-type = disk or reduced-fd), set the maximum write delay with the repository option, repository-disk-write-delay. Sources can reconfigure the repository's repository-disk-write-delay to a value less than or equal to the maximum configured for the repository with ume_write_delay.
Optional. Coordinate repository size options between the source and repository. If you wish to use the repository's values, you do not need to configure source configuration values. The repository sets a maximum for these three options. The source can reconfigure the repository's options with values less than or equal to the maximum configured for the repository using the following UM configuration options.
The sample configuration files shown below show how a store configuration file establishes certain RPP option values and the source can reconfigure them via a UM configuration file. Although only two files appear below, this configuration represents two, single-store quorum/consensus groups and one UM context. A second umestored configuration file would be required for the store store1rpp containing options and values identical to store0rpp.
The following example UM configuration file contains RPP options in the ##Persistence Options### section.
The source uses the same repository size values as the store. In this case, you do not need to specify these option values again in the source's UM Configuration File. They appear in this file for the sake of completeness.
The source reconfigures ume_flight_size_bytes to 1,000,000 bytes, which is less than the repository's 4 MB default. (The source can reconfigure this option to a value less than or equal to the repository's configured value.)
The source reconfigures ume_write_delay from the default of 0 ms to 1000 ms or 1 second.
The option, ume_session_id 5353, is commented out because this file specifies RegIDs 2929 and 2930, respectively, for the stores in the ume_store_name option. The option, ume_session_id, appears in this file as a reminder that you can use either RegIDs or Session IDs, but not both.
#Sample UM Configuration File, UMP Version 5.3 #Major Options source transport lbtrm # in order and reassembled receiver ordered_delivery 1 #Multicast Resolver Network Options context resolver_multicast_address 225.8.17.29 context resolver_multicast_interface 10.29.3.0/24 # Transport LBT-RM Netowrk Options source transport_lbtrm_multicast_address 225.8.17.30 context transport_lbtrm_multicast_address_low 225.12.17.10 context transport_lbtrm_multicast_address_high 225.12.17.14 #Transport LBT-RM Operation Options context transport_lbtrm_data_rate_limit 10000000 context transport_lbtrm_retransmit_rate_limit 5000000 # Transport LBT-RM Reliability Options receiver transport_lbtrm_nak_initial_backoff_interval 40000 receiver transport_lbtrm_nak_initial_backoff_interval 500 receiver transport_lbtrm_nak_generation_interval 10000 ##Turn off NAKs receiver transport_lbtrm_send_naks 0 #Request Network Options context request_tcp_port_low 55000 context request_tcp_port_high 55500 ## Persistence Options ### source ume_store_group 0:1 source ume_store_name store0rpp:2929:0 source ume_store_group 1:1 source ume_store_name store1rpp:2930:1 source ume_store_behavior qc source ume_flight_size 500 source ume_flight_size_bytes 1000000 source ume_receiver-paced-persistence 1 source ume_repository_size_threshold 104857600 source ume_repository_size_limit 209715200 source ume_repository_disk_file_size_limit 1073741824 source ume_repository_ack_on_reception 1 source ume_write_delay 1000 receiver ume_receiver-paced-persistence 1 receiver ume_explicit_ack_only 1 source ume_proxy_source 1 #source ume_session_id 535353 context ume_source_liveness_timeout 4000 context ume_receiver_liveness_interval 1000 source ume_confirmed_delivery_notification 1
The following example store configuration file contains RPP options in the ABC* topic section.
The store has raised the repository-size-limit from the default of 48 MB to 200 MB, the repository-size-threshold from the default of 0 to 100 MB, and the repository-disk-file-size-limit from the default of 100MB to 1 GB.
The store does not specify a source-flight-size-bytes-maximum, using the default of 4 MB.
<?xml version="1.0"?> <ume-store version="1.2"> <daemon> <log>/configs/stores/umestored1/umestored.log</log> <lbm-license-file>/bin/umq_exp_license.txt</lbm-license-file> <lbm-license-file>/bin/lbm_ume_umq_udx_rdma_license.txt</lbm-license-file> <lbm-config>/configs/lbm_4_store.cfg</lbm-config> <pidfile>/configs/stores/umestored1/umestored.pid</pidfile> <web-monitor>*:15404</web-monitor> </daemon> <stores> <store name="rpp-ump-test-store-1" port="14667"> <ume-attributes> <option type="store" name="disk-cache-directory" value="/stores/store1/cache"/> <option type="store" name="disk-state-directory" value="/stores/store1/state"/> <option type="store" name="allow-proxy-source" value="0" /> <option type="store" name="context-name" value="store1rpp"/> </ume-attributes> <topics> <topic pattern="ABC*" type="PCRE"> <ume-attributes> <option type="store" name="repository-allow-receiver-paced-persistence" value="1"/> <option type="store" name="repository-type" value="disk"/> <option type="store" name="repository-size-threshold" value="104857600"/> <option type="store" name="repository-size-limit" value="209715200"/> <option type="store" name="repository-disk-file-size-limit" value="1073741824"/> <option type="store" name="repository-allow-ack-on-reception" value="1"/> <option type="store" name="repository-disk-write-delay" value="1000"/> <option type="store" name="receiver-new-registration-rollback" value="0"/> <option type="store" name="source-activity-timeout" value="120000"/> <option type="store" name="receiver-activity-timeout" value="30000"/> <option type="store" name="retransmission-request-forwarding" value="0"/> </ume-attributes> </topic> </topics> </store> </stores> </ume-store>
UM Feature | Supported | Notes |
---|---|---|
UMP Proxy Sources | Yes | |
UM Gateway | No | Source-paced Persistence and Receiver-paced Persistence are currently not supported over a UM Gateway. |
UM Transports | Yes | |
Multi-Transport Threads | No | |
Off-Transport Recovery | Yes | |
Late Join | Yes | With the new store option, Acknowledge on Reception, sources may not retain sufficient sent messages to provide an effective Late Join capability. |
HF | Yes | |
HFX | Yes | |
Wildcard Receivers | Yes | |
Message Batching | Yes | |
Ordered Delivery | Yes | |
Request/Response | Yes | |
Multicast Immediate Messaging (MIM) | No | MIM messages are not persisted and have no impact on RPP. |
Source Side Filtering | Yes | |
Self-Describing Messaging (SDM) | Yes | |
Pre-Defined Messaging (PDM) | Yes | |
UM Spectrum | Yes | |
Monitoring/Statistics | Yes | |
Acceleration - DBL | Yes | |
Acceleration - UD | Yes | |
Implicit/Explicit Acknowledgements | Yes | |
Registration ID/Session Management | Yes | |
Fault Tolerance - Round Robin | No | If a RPP source attempts to register to a source repository configured for Round Robin fault tolerance, lbm_src_create() returns an error. |
Fault Tolerance - Quorum Consensus | Yes | |
UM SNMP Agent | Yes | |
Ultra Messaging Manager | Yes | |
Ultra Messaging Cache | Yes | |
Ultra Messaging Desktop Services | No |
The communication between source and receiver applications and UMQ instances follow many of the same patterns as the communication within UMP persistence applications. However to reduce the configuration of queue sources and receivers, some Queue-specific activities such as registration or queue resolution operate automatically and become active when the following two conditions occur.
The UM Configuration file contains the option, umq_queue_name.
A umestored is running configured for queuing. A queue specification contains not only queue information, but also the application sets receiving queue messages along with the topics being sent to the queue.
This section discusses the following topics.
Source and receiver applications in a queuing operation use the same registration and registration response behaviors as sources and receivers in a persistence operation. (See UMP Registration.) The contents of the actual messages for registration and registration response for queues are slightly different, but the message paths are essentially the same.
After a receiver registers with a Queue, the Queue issues an Assignment ID, which identifies the receiver. The Queue assigns this ID to all messages queued for the receiver's topic. The Assignment feature implements the OAOO delivery feature. The Queue assigns messages to a receiver after any one of the following events.
A message arrives at the Queue. (If no receiver interested in the topic has registered, the Queue holds the message until a receiver interested in the message's topic registers with the Queue.)
A receiver registers with the Queue. (Obviously, the Queue must possess messages for the receiver's topic.)
The Queue receives a Consumption Report from a receiver.
At a high level, the following registration activity occurs before a source application submits messages to a queue topic.
umq_queue_name must be set for queue Q1.
umestored must be started and configured for queue Q1 and topic SubjectA.
The source application creates a source object for topic SubjectA.
The source application's context automatically registers with Q1 if not already registered.
The Queue sends a Queue Registration Complete context event to the source application.
The source object automatically registers as SubjectA with Q1.
The Queue sends a Queue Registration Complete source event to the source application.
At a high level, the following registration activity occurs before a receiver application can receive queue topic messages.
umestored must be started and configured for queue Q1 and topic SubjectA.
The receiver application creates a receiver object for topic SubjectA.
The receiver discovers through topic resolution that Q1 has messages for topic SubjectA. (Topic advertisements in a queuing operation contain the queue name.)
The receiver application's context automatically registers with Q1 if not already registered.
The Queue sends a Queue Context Registration Complete message to the receiver application after the receiver application's context registers.
The receiver object automatically registers as SubjectA with Q1 If not using UMQ Sessions IDs, the receiver includes its Assignment ID with the registration request.
The Queue sends a Queue Receiver Registration Complete message to the receiver application. If using UMQ Sessions IDs, the Queue includes the receiver's Assignment ID with the registration complete message.
Depending on the data dissemination model in use, the messaging paths between sources, receivers, and queue instances may vary quite a bit.
The Serial Queue Dissemination (SQD) model (Serial Queue Dissemination (SQD)) uses direct serial unicast from the queue to the individual receivers. Receivers only receive the messages they are assigned to process. The term serial indicates that the queue sends each message via unicast only to the message's assigned receivers (one in each application set). This dissemination model creates less work for receivers than either PQD or SD, which require receivers to decipher control information to determine the messages they must consume.
The Parallel Queue Dissemination (PQD) model (Parallel Queue Dissemination (PQD)) uses normal UM transport sessions to disseminate messages. In fact, the queue uses individual UM topics to send messages to all receivers. In addition, the Queue sends control information (Receiver Control Record - RCR) over a specific topic, configured with the control-topic-name Queue option in the Queue's XML configuration file. (See Queue Element. Receivers listen to all data and control information and deliver all their assigned messages to the application, ignoring all other messages.
The Source Dissemination (SD) model also uses normal UM transport sessions from source application to send message data to the receivers. The queue sends control information (Receiver Control Record - RCR) as in the PQD model that instructs receivers via assignments what to process and what to ignore. However, the queue does not send data messages on topics.
Receiver applications as well as queue instances provide various forms of feedback. Queue instances send Stability Acknowledgements directly back to UMQ source applications to indicate successful submission of messages to the queue. Receiver applications signal message consumption by sending Consumption Reports back to the queue instances. See Queue Feedback.
UMQ supports a flight size mechanism similar to UMP Flight Size that tracks messages in flight from a particular source and responds when a send would exceed the configured flight size (umq_flight_size). You can configure umq_flight_size_behavior to either:
block any sends that would exceed the flight size or,
allow the sends while notifying your application.
UMQ considers a sent message in-flight until the source receives the configured number of stability acknowledgements from the queue(s). (No delivery confirmation exists in UMQ.) As with UMP Quorum/Consensus, intragroup and intergroup stability settings affect whether UMQ considers a messages in flight.
UMQ also supports a flight size mechanism for Multicast Immediate Messages (MIM). You configure MIM flight size with the context scope configuration options, (context) umq_flight_size and (context) umq_flight_size_behavior.
Note: A source can be configured to publish via UMP and UMQ. In either of these cases, flight sizes and behaviors can be configured differently with the appropriate configuration options. If a source publishes via both UMP and UMQ and the flight size behaviors for each are set to block, a send that exceeds either flight size will block.
Sources send messages on topics and receivers listen on topics for messages. Similarly, UMQ source applications submit messages to queues with each message being sent on a specific topic. UMQ receiver applications listen on topics for messages. This means that Application Sets and the once-and-only-once (OAOO) behavior are on a per topic basis. A potentially helpful analogy is a queue may be the name of a mailbox and a topic may be the subject of an individual letter.
Unlike UMP persistent messaging, queues use a queue resolution mechanism built upon UM topic resolution for service location. A UMQ source application does not have to know the IP address and TCP port for each queue instance. Instead, all it requires is the name of the queue. This provides some flexibility in deployment for moving queue instances around and requires much less static information to be maintained for configuration of sources and receivers.
UMQ supports the JMS Queue Browser specification with the following C API and Java API calls.
Action | C API | Java API |
---|---|---|
Retrieve a list of topics and application sets from a running queue daemon. | lbm_ctx_umq_queue_topic_list() |
LBMContext.queueTopicList() |
Retrieve a list of currently-enqueued message IDs from a running queue daemon. | lbm_rcv_umq_queue_msg_list() |
LBMReceiver.queueMessageList() |
Retrieve specific messages by message ID from a running queue daemon. | lbm_rcv_umq_queue_msg_retrieve() |
LBMReceiver.queueMessageRetrieve() |
The following UM configuration options apply to Queue Browsing.
UM queues can authenticate UM applications using the Ultra Messaging JMS Queue Browser feature. UM applications can also authenticate the queue.
Note: Ultra Messaging JMS users do not need to configure authentication for a Queue Browser. UMQ uses a internal default user, jmsuser, for JMS applications which requires no configuration.
The use of any of the queue browser APIs mentioned in Queue Browser, initiates authentication automatically between your application and the queue. You can require authentication between your application and the queue, ensuring that authentication must be successful before queue browsing can occur.
You require authentication by setting the UM Configuration option, umq_require_queue_authentication, to the default setting of 1 (authentication required). In addition, set the queue (umestored) configuration option, require-client-authentication to the default value of 1.
If you set ... | Then, |
---|---|
umq_require_queue_authentication = 1 and require-client-authentication = 0 | Authentication fails. (Possible error code, Core-5990-1) Your application does not respond to browsing command responses sent by the queue. |
umq_require_queue_authentication = 0 and require-client-authentication = 1 | Authentication fails. (Possible error code, CoreApi-5688-4135) Your application may send queue browsing commands to the queue, but the queue responds with an authentication failure. |
umq_require_queue_authentication = 0 and require-client-authentication = 0 | Authentication can either succeed or fail without effect. Queue Browsing occurs. |
Perform the following two tasks to set the Queue Browser authentication credentials.
Use the C API lbm_auth_set_credentials()
or the Java API
LBMAuthUserInfo()
in your application to create users and
passwords in your application. A Credential callback provides a way for you to supply
alternate credentials in the event of authentication failure.
Generate a password.xml file that contains the usernames and passwords used by your application. Place password.xml in the directory configured in the umestored XML configuration file with the option, lbm-password-file. See Daemon Element. The queue accesses this file during authentication to verify usernames and passwords. You can generate password.xml in one of the two following ways.
Use the lbm_authstorage_*()
API calls in an auxiliary
application to create password.xml. This application can import
any existing user credentials (i.e. from LDAP). (No Java equivalent exists for these
functions.)
Use the UMQ utility, /bin/lbmpwdgen to generate password.xml.
Usage information appears within the file. (This utility uses lbm_authstorage_*()
API calls.)
A sample password.xml appears below. Notice that you can also create and assign user roles. In the sample you may also notice that /bin/lbmpwdgen creates an anonymous user (<user name="">). UMQ requires this user when authentication has not been enabled. You should not delete or edit this user.
<?xml version="1.0"?> <um-configuration version="1.0"> <users> <user name="userSmith"> <verifier>69A4aAE70US3NiuZr/TvAbSWztu5na5TbFo8bdHxU5.ILdMu8rLd5ragE3p4Qcuz/nXxAj6kGnwIF2JrKdCf704U/Lxs7jvK.b2uyOQoqKG</verifier> <salt>3BmRWUznvzy0n2</salt> <roles> <role name="admin"></role> <role name="normal"></role> </roles> </user> <user name=""> <verifier/> <salt/> <roles> <role name="admin"/> </roles> </user> </users> <roles> <role name="admin"> <action>MSG_LIST</action> <action>MSG_RETRIEVE</action> <action>TOPIC_LIST</action> </role> <role name="normal"> <action>TOPIC_LIST</action> </role> </roles> </um-configuration>
ULB, while similar in some ways to UMQ, differs in some other ways. This section provides some details on how ULB works, and some comparisons with UMQ.
ULB supports the Parallel Source Dissemination (PSD) dissemination model. In the figure below, note that the ULB PSD model operates in a very similar way to the UMQ Parallel Queue Dissemination (PQD) model.
The key difference between ULB's PSD model and UMQ's is that with ULB, the source sends both the data and the assignment/control information on the same transport session. ULB has no need for a control channel, as with UMQ.
ULB receivers, as with UMQ, send unicast Consumption Reports back to the source.
ULB differs from UMQ somewhat in source "fairness". While UMQ decouples sources from receivers with a queue -- and therefore avoids receiver overload -- ULB does not use a queue or other middleware, so sources could conceivably combine to overload a receiver, because of the real-time nature of low-latency load balancing.
Therefore, ULB governs fairness between sources by using a) receiver feedback information and b) receiver portion size, in concert with c) source configuration option umq_ulb_application_set_load_factor_behavior. For more, see Queue Feedback and Receiver Portion Size.
ULB supports a flight size mechanism similar to UMP Flight Size and UMQ Flight Size that tracks messages in flight from a particular source and responds when a send would exceed the configured flight size (umq_ulb_flight_size). You can configure umq_ulb_flight_size_behavior to either:
block any sends that would exceed the flight size or,
allow the sends while notifying your application.
ULB considers a message in-flight until the source receives the MSG_COMPLETE notification from all application sets. See also umq_ulb_events.
Indexed Ultra Load Balancing (ULB) is similar to Indexed Queuing. The source and receiver APIs are exactly the same with only minor differences (e.g., receiver event types remain the same as for indexed queueing, but have a flag set indicating that the source of the event was a ULB source). There are two important differences to note:
Assignment of indices is done at the source, on a per-source basis, with no global coordination of index assignments, so multiple sources sending on the same index may happen to assign the index to different receivers.
The advanced allow/deny configuration rules and configuration option inheritance available via the umestored's Index Rules Element for indexed queueing are not available for indexed ULB.
The Ultra Messaging API provides a number of events, callbacks, messages, functions, and settings. The API reference (C API, Java API or .NET API) can be used to see the true extent of the API. In order to design successful applications, though, a high level understanding of the events and callbacks is essential.
Events - Source events occur on a per source basis.
Callbacks - Source and receiver callbacks called directly from UMP and UMQ internal operation and usually demands a return value be filled in and/or are informational in nature. Typically, applications do very little processing in callbacks.
Messages - Messages to receivers can simply contain UMP or UMQ information or have impact on operation.
Some specific languages, such as C, Java, or C# may have specific nuances for the various events and callbacks. But, by and large, an application should plan on having access to the items listed in the following sections. For details for a particular language, consult the Ultra Messaging API documentation (C API, Java API or .NET API).
The following events and callbacks are available for source applications.
Event Name | Type | Description |
---|---|---|
Store Registration Success | Source Event | Delivered once a source has successfully registered with a single store. Event contains flags to show if the source is "old" (i.e. a re-registration) as well as the sequence number that the source should use as its initial sequence number when sending, and the store information |
Store Registration Complete | Source Event | Delivered once a source has completed registration with the required store(s). This indicates the source may send as it desires. Event contains the consensus sequence number. |
Store Registration Error | Source Event | Delivered once a source has received an error from the store indicating the requested registration was not granted. Event contains an error message to indicate what happened. |
Queue Registration Complete | Source Event | Delivered once a source has completed registration with the Queue. This indicates the source may send as it desires. Event contains the Registration ID or Session ID. |
Queue Registration Error | Source Event | Delivered once a source has received an error from the Queue indicating the requested registration was not granted. Event contains an error message to indicate what happened. |
Store Message Stable | Source Event | Delivered once a message is stable at a single store. Event contains the message sequence number and indicates if the the message meets Intergroup and/or Intragroup stability requirements. Also includes the store information. |
Queue Message Stability ACK | Source Event | Stability acknowledgement sent to the source application by the Queue when a message sent by the source is stable. If the Queue is configured to persist data to disk, the message is stable once it has been written to the file. Otherwise, the Queue acknowledges the message upon receipt. |
Queue Message ID Information | Source Event | The Queue assigns a unique ID to every message in order to assign the message to a receiver. This assignment enforces OAOO delivery. The Queue includes assignment information in the control information sent to receivers in a Parallel Queue Dissemination (PQD) or Source Dissemination (SD) model. |
Delivery Confirmation | Source Event | Delivered once a message has been confirmed as delivered and processed by a receiving application. Event contains the message sequence number as well as indications whether the message has met the unique confirmations requirement. Also contains the receiver's Registration ID or Session ID. |
Store Unresponsive | Source Event | Delivered once a store is seen to be unresponsive due to failure or network disconnect. Event contains a message with more details suitable for logging. Sources using the unresponsive store as their only store (not in Round-Robin or Quorum/Consensus) will be prevented from sending until the store recovers. |
Store Message Reclaimed | Source Event | Delivered once a message has passed through retention and is about to be released from memory or disk. Event contains the message sequence number. (Reclaim refers to storage space reclamation.) |
Store Forced Reclaim | Callback | Indicates a message is being forcibly released because the memory size limit ( retransmit_retention_size_limit) has been exceeded. Event contains the message sequence number. |
Flight Size Notification | Callback | Indicates that the number of in-flight messages for a source has exceeded or fallen below the configured flight size limit for a source. The event indicates if the flight size has been exceeded (OVER) by a new message send or that a message recently stabilized has reduced the number of in flight messages to less than the flight size limit (UNDER). Notification also indicates if the event is for UMP, UMQ or ULB. |
RPP Source Registration Success | Source Event | Delivered once a source has successfully registered with a single store as a RPP source. The event contains either the RegID or Session ID, the sequence number of the last message stored for the source and store information. |
RPP Source Registration Failure | Source Event | Delivered once a source has received an error from the store indicating the requested registration was not granted. Event contains an error message to indicate what happened. |
RPP Source Deregistration Success | Source Event | Delivered once a source successfully deregisters from an individual store. The event contains either the RegID or Session ID, the sequence number of the last message stored for the source and store information. |
RPP Source Deregistration Complete | Source Event | Delivered once UMP receives a successful deregistration event from all stores. |
The following callbacks and messages are available for receiver applications
Event Name | Type | Description |
---|---|---|
Store Registration Success | Message | Delivered once a receiver has successfully registered with a single store. Message contains flags to show if the receiver is "old" (i.e. Not a new registration) as well as the sequence number that the receiver should use as its low sequence number, and the store information. In addition, the event contains the source's Registration ID or Session ID and the receiver's Registration ID or Session ID. |
Store Registration Complete | Message | Delivered once a receiver has completed registration with the store(s) required. This indicates the receiver may now receive data. Message contains the consensus sequence number. |
RPP Receiver Registration Success | Message | Delivered once a receiver has successfully registered with a single store as a RPP receiver. Message contains either the RegID or Session ID, the sequence number of the last message stored for the source and store information. |
RPP Receiver Registration Failure | Message | Delivered once a receiver has received an error from the store indicating the requested registration was not granted. Event contains an error message to indicate what happened. |
RPP Receiver Deregistration Success | Message | Delivered once a receiver successfully deregisters from an individual store. The message contains either the RegID or Session ID for the receiver and the source, the sequence number of the last message stored for the source and store information. |
RPP Receiver Deregistration Complete | Message | Delivered once UMP receives a successful deregistration event from all stores. |
Queue Registration Complete | Message | Delivered once a receiver has completed registration with the Queue. Message contains assignment information. |
Store Registration Error | Message | Delivered once a receiver has received an error from the store indicating the requested registration was not granted. Message contains an error message to indicate what happened. |
Queue Registration Error | Message | Delivered once a receiver has received an error from the Queue indicating the requested registration was not granted. Message contains an error message to indicate what happened. |
Store Registration Change | Message | Delivered once a change in store information is received from the source. The extent of the change is included in a message suitable for logging. |
Queue Deregistration Complete | Message | Event delivered to a UMQ receiving application by the
Queue when a receiver deregisters from a Queue by calling lbm_rcv_umq_deregister() . All messages must be delivered to the
application before the Queue sends the deregistration event. Deregistered receivers
cannot be assigned any new messages. |
Store Retransmission | Message | Retransmissions from recovery come in as normal messages with a flag indicating their status as a retransmission. |
Store Registration Function | Callback | Called once a receiver receives store information from a source and UMP desires to know the RegID to use for the receiver. Callback passes the source RegID, the store information, and the source transport name. The return value is the RegID that UMP should request to use from the store. |
Store Recovery Sequence Number Function | Callback | Called once registration is about to complete and the low sequence number must be determined. Callback passes the highest sequence number seen from the source and the consensus sequence number from the stores or sequence number from the store if using round-robin. |
Queue Index Assignment Eligibility Start Complete | Message | Event delivered to a UMQ receiving application by the
Queue when a receiver becomes eligible for new index assignments from a Queue as a result
of calling the lbm_rcv_umq_index_start_assignment()
function. |
Queue Index Assignment Eligibility Stop Complete | Message | Event delivered to a UMQ receiving application by the
Queue when a receiver becomes ineligible for new index assignments from a Queue as a
result of calling the lbm_rcv_umq_index_stop_assignment()
function. After this event is delivered, a receiver no longer receives new index
assignments from the Queue. Existing index assignments remain in place. |
Queue Index Assigned | Message | Event delivered to a UMQ receiving application by the Queue when the Queue assigns a receiver a new index. After this event is delivered, the receiver begins receiving messages on the new index. |
Queue Index Released | Message | Event delivered to a UMQ receiving application by the
Queue when the Queue removes one of the receiver's existing index assignments. This
usually occurs after the receiver calls lbm_rcv_umq_index_release() . As a result, the receiver no longer
receives any messages for the removed index. |
The following events are available for the context of source and receiver applications.
Event Name | Type | Description |
---|---|---|
Queue Registration Complete | Context Event | Delivered once a source or receiver application's context has completed registration with the Queue. A context only needs to register once with a Queue. Event contains the Registration ID or Session ID. |
Queue Registration Error | Context Event | Delivered once a source or receiver application has received an error from the Queue indicating the requested registration was not granted. Event contains an error message indicating what happened. |
Instance List Notification | Context Event | Delivered once a queue instance has changed. Event holds information string. |
Flight Size Notification | Context Event | Indicates that the number of in-flight Multicast Immediate Messages has exceeded or fallen below the configured flight size limit. The event indicates if the flight size has been exceeded (OVER) by a new message send or that a message recently stabilized has reduced the number of in flight messages to less than the flight size limit (UNDER). |
Copyright 2007 - 2014 Informatica Corporation.