How to choose the appropriate value for Producer's send timeout value?

2021-07-23 Thread Marco Guest
Hi, my company will use Pulsar as messaging system for a geographically distribuited architecture on Kubernetes. In our use case, an application using C++ Pulsar client will send up to 300 000 message/sec on twenty Pulsar permanent topics by asynchronous send. C++ Producer has a default send timeou

Is it possible to change the SendTimeout parameter value for the Pulsar C++ producer at runtime?

2021-07-23 Thread Marco Guest
Hi, for networking reasons, I would like to use a different value of parameter configured with pulsar::ProducerConfiguration::setSendTimeot() method: One value for the first connection and another value for subsequent send or sendAsync operation. Is it possible? How? Thanks

How to set the name of std::threads started by pulsar-client-cpp library?

2021-06-04 Thread Marco Guest
Hello, I'm looking to set custom names to std::threads started indirectly when producer and consumer objects of Pulsar C++ client library are allocated (on Linux operating system). Looking at the code it seems they are started by the ExecutorServiceProvider class, but AFAIK there’s no public API to

Re: Providing a custom deallocator for Pulsar::Message created via setAllocatedContent

2021-05-13 Thread Marco Guest
Merli ha scritto: > Yes, my `sizeof(char*)` was really not a good one :) > > > -- > Matteo Merli > > > On Thu, May 13, 2021 at 9:59 AM Marco Guest > wrote: > > > > Hi, > > it worked this way: > > > > === > > c

Re: Providing a custom deallocator for Pulsar::Message created via setAllocatedContent

2021-05-13 Thread Marco Guest
Hi, it worked this way: === char* payload = new char[1024]; Message msg = MessageBuilder() .setAllocatedContent(payload, 1024) .build(); producer.sendAsync(msg, [p = payload](Result res, const MessageId& messageId) { if (res == ResultOk) { // message

Re: Providing a custom deallocator for Pulsar::Message created via setAllocatedContent

2021-05-13 Thread Marco Guest
const MessageId& messageId) { > if (res == ResultOk) { > // message was published correctly > } else { > // publish error > } > delete[] payload; > }); > === > > Does that work for you? > > > -- > Matteo Merli > > &g

Providing a custom deallocator for Pulsar::Message created via setAllocatedContent

2021-05-06 Thread Marco Guest
Hi, I am implementing a message exchange between C++ applications using Pulsar technology. To improve performances I would like to avoid copying my application data when creating a new Pulsar::Message. For this reason I would like to use pulsar::MessageBuilder::setAllocatedContent(). However I’m in