WIP: Added transactional support to configuration.#110
WIP: Added transactional support to configuration.#110
Conversation
|
I review your code, and have a question: how do we use transaction? in pulsar offical java demo here is example: Transaction txn = pulsarClient
.newTransaction()
.withTransactionTimeout(5, TimeUnit.MINUTES)
.build()
.get();
//producer
producer.newMessage(txn).value("Hello Pulsar Transaction".getBytes()).sendAsync();
txn.commit().get();
//consumer
Message<byte[]> message = consumer.receive();
consumer.acknowledgeAsync(message.getMessageId(), txn);
txn.commit().get(); |
|
Hi @Wanxp , I still didn't design the way how the transaction will work. This PR is just about to make the configuration work and so people can use raw pularClient in case they wish to implement transactions alongside the library. I realised some issue during testing so didn't merge but left the PR so I won't forget to check it again. Feel free to contribute and suggest some way it would work. Thank you for your code, it makes sense to me how the transaction works so I think it won't be that complicated to implement it. |
|
Ideally, this should be tied to the |
No description provided.