Skip to content

How can I use transaction using this library #257

Answered by Havret
jollyamit asked this question in Q&A
Discussion options

You must be logged in to vote

@jollyamit The simplest example may look as follows:

using System;
using System.Threading.Tasks;
using ActiveMQ.Artemis.Client;
using ActiveMQ.Artemis.Client.Transactions;

namespace Example
{
    class Program
    {
        static async Task Main()
        {
            var endpoint = Endpoint.Create("localhost", 5672, "guest", "guest");
            var connectionFactory = new ConnectionFactory();
            await using var connection = await connectionFactory.CreateAsync(endpoint);
            await using var producer = await connection.CreateProducerAsync("my-address");
            
            await using var transaction = new Transaction();
            var message = new Message("my-…

Replies: 1 comment 11 replies

Comment options

You must be logged in to vote
11 replies
@jollyamit
Comment options

@Havret
Comment options

@jollyamit
Comment options

@Havret
Comment options

@jollyamit
Comment options

Answer selected by Havret
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
question Further information is requested
2 participants