cleverblue opened a new issue #12564:
URL: https://github.com/apache/pulsar/issues/12564
At present, the client and producer of C + + client do not support defining
variables as class members, so they cannot be defined in the following form:
ca.h
class ca
{
public:
Client client;
Producer producer;
}
ca.cpp
ca::init(string topic )
{
client = client(address);
result= client.createProducer(string("persistent://public/default/ ")+topic,
producerConf, producer);
}
ca::push_ data(string data)
{
Message msg = MessageBuilder().setContent(data).build();
producer.sendAsync(msg, std::bind(callback,std::placeholders::_1,
std::placeholders::_2, data));
}
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]