--- url: "http://www.enterpriseintegrationpatterns.com/TransactionalClient.html" titulek: "Transactional Client - Enterprise Integration Patterns" h1: "" popis: "How can a client control its transactions with the messaging system?" jazyk: "en" kanonicka: "" drobecky: [] zdroj: "live" wayback_snapshot: "" stazeno: "2026-09-15 15:34:37" znaku: 5989 slov: 531 kodovani: "utf-8" sha256: "4c68a9d914e3aef5c2d003ee0b823a0954189713cf3e1b949d533234a65a93c9" --- | | Transactional Client[Messaging Patterns](index.html) » [Messaging Endpoints](MessagingEndpointsIntro.html) | [Contents](toc.html)[⇐ Prev](MessagingMapper.html)[Next ⇒](PollingConsumer.html) | | --- | --- | --- | A messaging system, by necessity, uses transactional behavior internally. It may be useful for an external client to be able to control the scope of the transactions that impact its behavior. How can a client control its transactions with the messaging system? Use a *Transactional Client*—make the client’s session with the messaging system transactional so that the client can specify transaction boundaries. Both a sender and a receiver can be transactional. With a sender, the message isn’t “really” added to the channel until the sender commits the transaction. With a receiver, the message isn’t “really” removed from the channel until the receiver commits the transaction. A sender that uses explicit transactions can be used with a receiver that uses implicit transactions, and vise versa. A single channel might have a combination of implicitly and explicitly transactional senders; it could also have a combination of receivers. ... Read the entire pattern in the book [Enterprise Integration Patterns](/books1.html) ## Example: (Not quite) Transactional Client in Amazon SQS[NEW](/ramblings/eip1_examples_updated.html) *Transactional Client* semantics can cause serious performance degradation in widely distributed systems. Many cloud-based messaging systems therefore don't implement *Transactional Client*s. However, these systems still aim to provide protection against client s crashing after they consume but before they process a message. The [Amazon Simple Queuing Service (SQS)](https://aws.amazon.com/sqs) provides this protection via so-called *Visibility Timeout*. In this configuration, message consumers don't actually remove messages from the queue - the message simply becomes invisible to other consumers. After successfully processing the message, a message consumer must explicitly delete the message from the queue. If a message is not deleted, it becomes visible again to other consumers after the set timeout interval expires. The book *Cloud Computing Patterns* documents this behavior as a distinct pattern called [Time-out Based Delivery](http://www.cloudcomputingpatterns.org/timeout_based_delivery/). **Related patterns:** [*Channel Adapter*](ChannelAdapter.html), [*Competing Consumers*](CompetingConsumers.html), [*Document Message*](DocumentMessage.html), [*Event-Driven Consumer*](EventDrivenConsumer.html), [*Event Message*](EventMessage.html), [*Guaranteed Delivery*](GuaranteedMessaging.html), [*Message*](Message.html), [*Message Channel*](MessageChannel.html), [*Message Dispatcher*](MessageDispatcher.html), [*Message Endpoint*](MessageEndpoint.html), [*Message Router*](MessageRouter.html), [*Message Sequence*](MessageSequence.html), [*Message Translator*](MessageTranslator.html), [*Messaging Bridge*](MessagingBridge.html), [*Pipes and Filters*](PipesAndFilters.html), [*Point-to-Point Channel*](PointToPointChannel.html), [*Polling Consumer*](PollingConsumer.html), [*Publish-Subscribe Channel*](PublishSubscribeChannel.html), [*Request-Reply*](RequestReply.html), [*Resequencer*](Resequencer.html) --- ## Integration Pattern Language [Message Construct.](MessageConstructionIntro.html) [Message](Message.html) [Command Message](CommandMessage.html) [Document Message](DocumentMessage.html) [Event Message](EventMessage.html) [Request-Reply](RequestReply.html) [Return Address](ReturnAddress.html) [Correlation Identifier](CorrelationIdentifier.html) [Message Sequence](MessageSequence.html) [Message Expiration](MessageExpiration.html) [Format Indicator](FormatIndicator.html) [Message Routing](MessageRoutingIntro.html) [Pipes-and-Filters](PipesAndFilters.html) [Message Router](MessageRouter.html) [Content-based Router](ContentBasedRouter.html) [Message Filter](Filter.html) [Dynamic Router](DynamicRouter.html) [Recipient List](RecipientList.html) [Splitter](Sequencer.html) [Aggregator](Aggregator.html) [Resequencer](Resequencer.html) [Composed Msg. Processor](DistributionAggregate.html) [Scatter-Gather](BroadcastAggregate.html) [Routing Slip](RoutingTable.html) [Process Manager](ProcessManager.html) [Message Broker](MessageBroker.html) [Message Transformation](MessageTransformationIntro.html) [Message Translator](MessageTranslator.html) [Envelope Wrapper](EnvelopeWrapper.html) [Content Enricher](DataEnricher.html) [Content Filter](ContentFilter.html) [Claim Check](StoreInLibrary.html) [Normalizer](Normalizer.html) [Canonical Data Model](CanonicalDataModel.html) [Messaging Endpoints](MessagingEndpointsIntro.html) [Message Endpoint](MessageEndpoint.html) [Messaging Gateway](MessagingGateway.html) [Messaging Mapper](MessagingMapper.html) [Transactional Client](TransactionalClient.html) [Polling Consumer](PollingConsumer.html) [Event-driven Consumer](EventDrivenConsumer.html) [Competing Consumers](CompetingConsumers.html) [Message Dispatcher](MessageDispatcher.html) [Selective Consumer](MessageSelector.html) [Durable Subscriber](DurableSubscription.html) [Idempotent Receiver](IdempotentReceiver.html) [Service Activator](MessagingAdapter.html) [Messaging Channels](MessagingChannelsIntro.html) [Message Channel](MessageChannel.html) [Point-to-Point Channel](PointToPointChannel.html) [Publish-Subscr. Channel](PublishSubscribeChannel.html) [Datatype Channel](DatatypeChannel.html) [Invalid Message Channel](InvalidMessageChannel.html) [Dead Letter Channel](DeadLetterChannel.html) [Guaranteed Delivery](GuaranteedMessaging.html) [Channel Adapter](ChannelAdapter.html) [Messaging Bridge](MessagingBridge.html) [Message Bus](MessageBus.html) [Systems Mgmt.](SystemManagementIntro.html) [Control Bus](ControlBus.html) [Detour](Detour.html) [Wire Tap](WireTap.html) [Message History](MessageHistory.html) [Message Store](MessageStore.html) [Smart Proxy](SmartProxy.html) [Test Message](TestMessage.html) [Channel Purger](ChannelPurger.html)