Added: dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.1.0-candidate-1/x86-windows-static/include/pulsar/ProducerCryptoFailureAction.h.sha512 ============================================================================== --- dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.1.0-candidate-1/x86-windows-static/include/pulsar/ProducerCryptoFailureAction.h.sha512 (added) +++ dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.1.0-candidate-1/x86-windows-static/include/pulsar/ProducerCryptoFailureAction.h.sha512 Wed Nov 23 09:18:55 2022 @@ -0,0 +1 @@ +6900be81109f868cc772ceec5580e11cf96dd70ff735736e64a96c39acc7c564237641fa74e9a31fd19d72d5fdfe6656fec37329eca4d2d690de5f084e78426b ./x86-windows-static/include/pulsar/ProducerCryptoFailureAction.h
Added: dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.1.0-candidate-1/x86-windows-static/include/pulsar/ProtobufNativeSchema.h ============================================================================== --- dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.1.0-candidate-1/x86-windows-static/include/pulsar/ProtobufNativeSchema.h (added) +++ dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.1.0-candidate-1/x86-windows-static/include/pulsar/ProtobufNativeSchema.h Wed Nov 23 09:18:55 2022 @@ -0,0 +1,35 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +#pragma once + +#include <google/protobuf/descriptor.h> +#include <pulsar/Schema.h> + +namespace pulsar { + +/** + * Create a protobuf native schema using a descriptor. + * + * @param descriptor the Descriptor object of the target class + * @return the protobuf native schema + * @throw std::invalid_argument if descriptor is nullptr + */ +PULSAR_PUBLIC SchemaInfo createProtobufNativeSchema(const google::protobuf::Descriptor* descriptor); + +} // namespace pulsar Added: dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.1.0-candidate-1/x86-windows-static/include/pulsar/ProtobufNativeSchema.h.asc ============================================================================== --- dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.1.0-candidate-1/x86-windows-static/include/pulsar/ProtobufNativeSchema.h.asc (added) +++ dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.1.0-candidate-1/x86-windows-static/include/pulsar/ProtobufNativeSchema.h.asc Wed Nov 23 09:18:55 2022 @@ -0,0 +1,16 @@ +-----BEGIN PGP SIGNATURE----- + +iQIzBAABCgAdFiEE6ItqSN52cCOQDJEjT0AbyNP5+1UFAmN9xY0ACgkQT0AbyNP5 ++1WwOhAAqdcPT3Ko0Pxuc5AH5unzClOHFXwZ2rs44Wj6ML9PVHeF7K3p8KpG5v8O +/V1klPAx6fEcMMdk9kmi/1QpomysIa2/RfHnAretMJzldFuA9HfGv3eY7meLutb0 +KYq95fiMr5q2TIVLIbxXw/iOwOW2Zb4r0Ms7B+kR/LS0viyp2UPz8AkMNxusBoIh +N73RSa3nPkN+NlxvXg4F8bYSbcScAgpu6U9POvg78EFXqwKQ9DfVRRXE+ZZhmHZs +QbuwZVisECCubi3z3x6Tep+3HeuHS1Ntk7CJpLY9FjNaI+AXtlsWEFKspp/yZhtA ++r9zDgzrlKxf1xdWvgVMdFNvntKNHiSmxd7CitZp6xdT3hNVT5PcPdp8vNgqoKBj ++/HgGbYwwqDnTODnP546PSxkzcqw7VXBJrySgmEevdrR0eoaC8BeSOXsiObye/GJ +Bza+h1AAAVVD7UyUzoWHNiiFwgda/9k1cgyIYNGB6+09cEnVHcy56A+sbMk43aey ++W03Xm/oIqOMVP/orkKezKjlKXyclVRDmh3QusVm0wzI60379PN6qtQRFaILpxAL +k86Cb43PAef/mMmhjkAKpna1y+2wDKFHYb+CaO1JTyygTTToZdgjxpc7wDhvZfIJ +vxo9IkGTzjYzERt05KvIV8cuNJCk9I/oSzK9cVY1sbGYDQY5CbA= +=Ol2B +-----END PGP SIGNATURE----- Added: dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.1.0-candidate-1/x86-windows-static/include/pulsar/ProtobufNativeSchema.h.sha512 ============================================================================== --- dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.1.0-candidate-1/x86-windows-static/include/pulsar/ProtobufNativeSchema.h.sha512 (added) +++ dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.1.0-candidate-1/x86-windows-static/include/pulsar/ProtobufNativeSchema.h.sha512 Wed Nov 23 09:18:55 2022 @@ -0,0 +1 @@ +5b179edf2f83ad52f2689e236e5d7cc22d1fdc5d8308cf7390b4ce071aed2749e087cbb5c6a2685dbbabc9937f797549177cadc5a9e1f246488d2cf3b922a338 ./x86-windows-static/include/pulsar/ProtobufNativeSchema.h Added: dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.1.0-candidate-1/x86-windows-static/include/pulsar/Reader.h ============================================================================== --- dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.1.0-candidate-1/x86-windows-static/include/pulsar/Reader.h (added) +++ dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.1.0-candidate-1/x86-windows-static/include/pulsar/Reader.h Wed Nov 23 09:18:55 2022 @@ -0,0 +1,163 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +#ifndef PULSAR_READER_HPP_ +#define PULSAR_READER_HPP_ + +#include <pulsar/Message.h> +#include <pulsar/ReaderConfiguration.h> +#include <pulsar/defines.h> + +namespace pulsar { +class PulsarWrapper; +class PulsarFriend; +class ReaderImpl; + +typedef std::function<void(Result result, bool hasMessageAvailable)> HasMessageAvailableCallback; + +/** + * A Reader can be used to scan through all the messages currently available in a topic. + */ +class PULSAR_PUBLIC Reader { + public: + /** + * Construct an uninitialized reader object + */ + Reader(); + + /** + * @return the topic this reader is reading from + */ + const std::string& getTopic() const; + + /** + * Read a single message. + * + * If a message is not immediately available, this method will block until a new + * message is available. + * + * @param msg a non-const reference where the received message will be copied + * @return ResultOk when a message is received + * @return ResultInvalidConfiguration if a message listener had been set in the configuration + */ + Result readNext(Message& msg); + + /** + * Read a single message + * + * @param msg a non-const reference where the received message will be copied + * @param timeoutMs the receive timeout in milliseconds + * @return ResultOk if a message was received + * @return ResultTimeout if the receive timeout was triggered + * @return ResultInvalidConfiguration if a message listener had been set in the configuration + */ + Result readNext(Message& msg, int timeoutMs); + + /** + * Close the reader and stop the broker to push more messages + * + * @return ResultOk if the reader is closed successfully + */ + Result close(); + + /** + * Asynchronously close the reader and stop the broker to push more messages + * + * @param callback the callback that is triggered when the reader is closed + */ + void closeAsync(ResultCallback callback); + + /** + * Asynchronously check if there is any message available to read from the current position. + */ + void hasMessageAvailableAsync(HasMessageAvailableCallback callback); + + /** + * Check if there is any message available to read from the current position. + */ + Result hasMessageAvailable(bool& hasMessageAvailable); + + /** + * Reset the this reader to a specific message id. + * The message id can either be a specific message or represent the first or last messages in the topic. + * + * Note: this operation can only be done on non-partitioned topics. For these, one can rather perform the + * seek() on the individual partitions. + * + * @param messageId + * the message id where to reposition the subscription + */ + Result seek(const MessageId& msgId); + + /** + * Reset this reader to a specific message publish time. + * + * @param timestamp + * the message publish time where to reposition the subscription + */ + Result seek(uint64_t timestamp); + + /** + * Asynchronously reset this reader to a specific message id. + * The message id can either be a specific message or represent the first or last messages in the topic. + * + * Note: this operation can only be done on non-partitioned topics. For these, one can rather perform the + * seek() on the individual partitions. + * + * @param messageId + * the message id where to reposition the subscription + */ + void seekAsync(const MessageId& msgId, ResultCallback callback); + + /** + * Asynchronously reset this reader to a specific message publish time. + * + * @param timestamp + * the message publish time where to reposition the subscription + */ + void seekAsync(uint64_t timestamp, ResultCallback callback); + + /** + * @return Whether the reader is currently connected to the broker + */ + bool isConnected() const; + + /** + * Asynchronously get an ID of the last available message or a message ID with -1 as an entryId if the + * topic is empty. + */ + void getLastMessageIdAsync(GetLastMessageIdCallback callback); + + /** + * Get an ID of the last available message or a message ID with -1 as an entryId if the topic is empty. + */ + Result getLastMessageId(MessageId& messageId); + + private: + typedef std::shared_ptr<ReaderImpl> ReaderImplPtr; + ReaderImplPtr impl_; + explicit Reader(ReaderImplPtr); + + friend class PulsarFriend; + friend class PulsarWrapper; + friend class ReaderImpl; + friend class ReaderTest; +}; +} // namespace pulsar + +#endif /* PULSAR_READER_HPP_ */ Added: dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.1.0-candidate-1/x86-windows-static/include/pulsar/Reader.h.asc ============================================================================== --- dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.1.0-candidate-1/x86-windows-static/include/pulsar/Reader.h.asc (added) +++ dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.1.0-candidate-1/x86-windows-static/include/pulsar/Reader.h.asc Wed Nov 23 09:18:55 2022 @@ -0,0 +1,16 @@ +-----BEGIN PGP SIGNATURE----- + +iQIzBAABCgAdFiEE6ItqSN52cCOQDJEjT0AbyNP5+1UFAmN9xYkACgkQT0AbyNP5 ++1W6WA/+NaGnFBCV+xIvvKoomHsoqlpSCcHEo5zH04stsFDIJTcbfd52Rg6dZmuJ +K8+QGAzVS+4r5AGeXpuK0upYm++ZNy5vJgwZk14niGI0mttC+PyTfE9SkCYEkUIf +9Kvq04ZzH2XEi8D5xtHr7ECT+ED0wC5baZL9XMhA74po0QKRPvXo6FvvFMz7DfO1 +tT4mH6OauQUFP3vrej80WrbNFsXr5fEx7KW1N1w6YdH8JMCagUAT8nQrbZjpwG4r +Sr75JaGehUzPSGwb9n54/8STv499K2cSkUd2XYv6GEFtd75OYDqsLweHF0aMP1Iu +zQgsdCT5J4gMU30O7CqJIxA2No8YxtIwG8qZ5iAUbiJnR0CEGrAdCbP3z6RpW50B +YtRp8zI1RhWEdng87kAUxrpl/N3g/D0bshwKEcpvFInsv0k3/kN4u/bWfwATxZP8 +38V/j3OoC+oNH7eFfDbtsTdpM3Co6WlTEHhR69PWGnleSGCJDin3huLl9PBAiwHg +l1kTzndUOo2RgpztBlAC2BK5i0uExdDT5kZ2PjsO1fcMjC5grbVStRwtpKxZi6L/ +NEuASYBpgayE7hkmlN7O6lx0LyuXO5P79hwBMsD+OX3i+8zoz1jSDmesXSh1C4LR +ElpWNSIuW92ACO9hEm7g1CDXluqQgJfFXtuHzjRqC6XMMrpiOb4= +=BDms +-----END PGP SIGNATURE----- Added: dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.1.0-candidate-1/x86-windows-static/include/pulsar/Reader.h.sha512 ============================================================================== --- dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.1.0-candidate-1/x86-windows-static/include/pulsar/Reader.h.sha512 (added) +++ dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.1.0-candidate-1/x86-windows-static/include/pulsar/Reader.h.sha512 Wed Nov 23 09:18:55 2022 @@ -0,0 +1 @@ +fcd0811d4ee6d41e7ac6100bedbbc7d86a53b3a4a405533b009c27b674f4537f59565bc7871f3f185dab8c8c746675ec175fcfa64bd3d4de624dbc4441ea6437 ./x86-windows-static/include/pulsar/Reader.h Added: dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.1.0-candidate-1/x86-windows-static/include/pulsar/ReaderConfiguration.h ============================================================================== --- dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.1.0-candidate-1/x86-windows-static/include/pulsar/ReaderConfiguration.h (added) +++ dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.1.0-candidate-1/x86-windows-static/include/pulsar/ReaderConfiguration.h Wed Nov 23 09:18:55 2022 @@ -0,0 +1,303 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +#ifndef PULSAR_READER_CONFIGURATION_H_ +#define PULSAR_READER_CONFIGURATION_H_ + +#include <pulsar/ConsumerCryptoFailureAction.h> +#include <pulsar/CryptoKeyReader.h> +#include <pulsar/Message.h> +#include <pulsar/Result.h> +#include <pulsar/Schema.h> +#include <pulsar/defines.h> + +#include <functional> +#include <memory> + +namespace pulsar { + +class Reader; +class PulsarWrapper; + +/// Callback definition for non-data operation +typedef std::function<void(Result result)> ResultCallback; +typedef std::function<void(Result result, MessageId messageId)> GetLastMessageIdCallback; + +/// Callback definition for MessageListener +typedef std::function<void(Reader reader, const Message& msg)> ReaderListener; + +struct ReaderConfigurationImpl; + +/** + * Class specifying the configuration of a consumer. + */ +class PULSAR_PUBLIC ReaderConfiguration { + public: + ReaderConfiguration(); + ~ReaderConfiguration(); + ReaderConfiguration(const ReaderConfiguration&); + ReaderConfiguration& operator=(const ReaderConfiguration&); + + /** + * Declare the schema of the data that this reader will be accepting. + * + * The schema will be checked against the schema of the topic, and the + * reader creation will fail if it's not compatible. + * + * @param schemaInfo the schema definition object + */ + ReaderConfiguration& setSchema(const SchemaInfo& schemaInfo); + + /** + * @return the schema information declared for this consumer + */ + const SchemaInfo& getSchema() const; + + /** + * A message listener enables your application to configure how to process + * messages. A listener will be called in order for every message received. + */ + ReaderConfiguration& setReaderListener(ReaderListener listener); + + /** + * @return the configured {@link ReaderListener} for the reader + */ + ReaderListener getReaderListener() const; + + /** + * @return true if {@link ReaderListener} has been set + */ + bool hasReaderListener() const; + + /** + * Sets the size of the reader receive queue. + * + * The consumer receive queue controls how many messages can be accumulated by the consumer before the + * application calls receive(). Using a higher value may potentially increase the consumer throughput + * at the expense of bigger memory utilization. + * + * Setting the consumer queue size to 0 decreases the throughput of the consumer by disabling + * pre-fetching of + * messages. This approach improves the message distribution on shared subscription by pushing messages + * only to + * the consumers that are ready to process them. Neither receive with timeout nor partitioned topics can + * be + * used if the consumer queue size is 0. The receive() function call should not be interrupted when + * the consumer queue size is 0. + * + * The default value is 1000 messages and it is appropriate for most use cases. + * + * @param size + * the new receiver queue size value + */ + void setReceiverQueueSize(int size); + + /** + * @return the receiver queue size + */ + int getReceiverQueueSize() const; + + /** + * Set the reader name. + * + * @param readerName + */ + void setReaderName(const std::string& readerName); + + /** + * @return the reader name + */ + const std::string& getReaderName() const; + + /** + * Set the subscription role prefix. + * + * The default prefix is an empty string. + * + * @param subscriptionRolePrefix + */ + void setSubscriptionRolePrefix(const std::string& subscriptionRolePrefix); + + /** + * @return the subscription role prefix + */ + const std::string& getSubscriptionRolePrefix() const; + + /** + * If enabled, the consumer reads messages from the compacted topics rather than reading the full message + * backlog of the topic. This means that if the topic has been compacted, the consumer only sees the + * latest value for each key in the topic, up until the point in the topic message backlog that has been + * compacted. Beyond that point, message is sent as normal. + * + * readCompacted can only be enabled subscriptions to persistent topics, which have a single active + * consumer (for example, failure or exclusive subscriptions). Attempting to enable it on subscriptions to + * a non-persistent topics or on a shared subscription leads to the subscription call failure. + * + * @param readCompacted + * whether to read from the compacted topic + */ + void setReadCompacted(bool compacted); + + /** + * @return true if readCompacted is enabled + */ + bool isReadCompacted() const; + + /** + * Set the internal subscription name. + * + * @param internal subscriptionName + */ + void setInternalSubscriptionName(std::string internalSubscriptionName); + + /** + * @return the internal subscription name + */ + const std::string& getInternalSubscriptionName() const; + + /** + * Set the timeout in milliseconds for unacknowledged messages, the timeout needs to be greater than + * 10 seconds. An Exception is thrown if the given value is less than 10000 (10 seconds). + * If a successful acknowledgement is not sent within the timeout all the unacknowledged messages are + * redelivered. + * @param timeout in milliseconds + */ + void setUnAckedMessagesTimeoutMs(const uint64_t milliSeconds); + + /** + * @return the configured timeout in milliseconds for unacked messages. + */ + long getUnAckedMessagesTimeoutMs() const; + + /** + * Set the tick duration time that defines the granularity of the ack-timeout redelivery (in + * milliseconds). + * + * The default value is 1000, which means 1 second. + * + * Using a higher tick time + * reduces the memory overhead to track messages when the ack-timeout is set to a bigger value. + * + * @param milliSeconds the tick duration time (in milliseconds) + * + */ + void setTickDurationInMs(const uint64_t milliSeconds); + + /** + * @return the tick duration time (in milliseconds) + */ + long getTickDurationInMs() const; + + /** + * Set time window in milliseconds for grouping message ACK requests. An ACK request is not sent + * to broker until the time window reaches its end, or the number of grouped messages reaches + * limit. Default is 100 milliseconds. If it's set to a non-positive value, ACK requests will be + * directly sent to broker without grouping. + * + * @param ackGroupMillis time of ACK grouping window in milliseconds. + */ + void setAckGroupingTimeMs(long ackGroupingMillis); + + /** + * Get grouping time window in milliseconds. + * + * @return grouping time window in milliseconds. + */ + long getAckGroupingTimeMs() const; + + /** + * Set max number of grouped messages within one grouping time window. If it's set to a + * non-positive value, number of grouped messages is not limited. Default is 1000. + * + * @param maxGroupingSize max number of grouped messages with in one grouping time window. + */ + void setAckGroupingMaxSize(long maxGroupingSize); + + /** + * Get max number of grouped messages within one grouping time window. + * + * @return max number of grouped messages within one grouping time window. + */ + long getAckGroupingMaxSize() const; + + /** + * @return true if encryption keys are added + */ + bool isEncryptionEnabled() const; + + /** + * @return the shared pointer to CryptoKeyReader + */ + const CryptoKeyReaderPtr getCryptoKeyReader() const; + + /** + * Set the shared pointer to CryptoKeyReader. + * + * @param the shared pointer to CryptoKeyReader + */ + ReaderConfiguration& setCryptoKeyReader(CryptoKeyReaderPtr cryptoKeyReader); + + /** + * @return the ConsumerCryptoFailureAction + */ + ConsumerCryptoFailureAction getCryptoFailureAction() const; + + /** + * Set the CryptoFailureAction for the reader. + */ + ReaderConfiguration& setCryptoFailureAction(ConsumerCryptoFailureAction action); + + /** + * Check whether the message has a specific property attached. + * + * @param name the name of the property to check + * @return true if the message has the specified property + * @return false if the property is not defined + */ + bool hasProperty(const std::string& name) const; + + /** + * Get the value of a specific property + * + * @param name the name of the property + * @return the value of the property or null if the property was not defined + */ + const std::string& getProperty(const std::string& name) const; + + /** + * Get all the properties attached to this producer. + */ + std::map<std::string, std::string>& getProperties() const; + + /** + * Sets a new property on a message. + * @param name the name of the property + * @param value the associated value + */ + ReaderConfiguration& setProperty(const std::string& name, const std::string& value); + + /** + * Add all the properties in the provided map + */ + ReaderConfiguration& setProperties(const std::map<std::string, std::string>& properties); + + private: + std::shared_ptr<ReaderConfigurationImpl> impl_; +}; +} // namespace pulsar +#endif /* PULSAR_READER_CONFIGURATION_H_ */ Added: dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.1.0-candidate-1/x86-windows-static/include/pulsar/ReaderConfiguration.h.asc ============================================================================== --- dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.1.0-candidate-1/x86-windows-static/include/pulsar/ReaderConfiguration.h.asc (added) +++ dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.1.0-candidate-1/x86-windows-static/include/pulsar/ReaderConfiguration.h.asc Wed Nov 23 09:18:55 2022 @@ -0,0 +1,16 @@ +-----BEGIN PGP SIGNATURE----- + +iQIzBAABCgAdFiEE6ItqSN52cCOQDJEjT0AbyNP5+1UFAmN9xYwACgkQT0AbyNP5 ++1WQnQ/8DiWp4LHMP7b5Y/YVihFsGciKa328eRZocyQcA2R+FaoBOP995Q74HkyN +DjBH90IIKRCreGzdLWsNcgI/5IjWHbN2xizA/ZKPFBBCsapYH4ttBmc8jQJV6tOU +91WkZTqcRQUN9JghHspHjBND9moWq/YCCSdjES1HI1dJ5P0OOx028SZIiTYH3WC3 +D5Ign0Nb78iBL6F79QXCTeb0R3bZSBT1v6IEe7zvN6eF+Xbu63K1qFrmzrNC2JWg +ScPny22Ijlab/W9kCoAgDBKG3ObCN7sVRPUhOpHe/2rOA6IQMexEBtiQacPgQCo1 +4N+Qoo1nvgzo138fmmzOIkaZB1aMXaN10adMcGGjuWq6XIZ0GQI+AWBpbhG8IvfT +jyDF8w1lLobeNY0h9nPV1kbHVhb6lK7GsUNQxztSUvBj7rbiYzZibDS4qVbmYwDm +/G6JeRLVovEST9vCJOqDoNfm8t4nQufsNP0zCCEuDj+hbB2hKW9d9kHRA5AAAt6B +xjuGKeRDJhJhdBFtmMT66dO0WhVtIbBvcoRauAxdh4Uy7sRNmJMHgidPjRYN7n2s +SCbqFmKGDQJ5uWEOf9t45qR8Gl/7aR79hGGMql5cEnXhYTZ5J68m5Uvl9R+VKnpe +xniq7ATp6LsSxmNKOKz1/x4+qEe0tckirz1Wp98J4TqZaQ2I5Sk= +=GfrG +-----END PGP SIGNATURE----- Added: dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.1.0-candidate-1/x86-windows-static/include/pulsar/ReaderConfiguration.h.sha512 ============================================================================== --- dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.1.0-candidate-1/x86-windows-static/include/pulsar/ReaderConfiguration.h.sha512 (added) +++ dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.1.0-candidate-1/x86-windows-static/include/pulsar/ReaderConfiguration.h.sha512 Wed Nov 23 09:18:55 2022 @@ -0,0 +1 @@ +972a8f7aa1f680d6c2029ee10919e0286991879309c3fa01d6a17042d188ef7ea30ddbdf6d5abea59111419275d94b32c8e0e2e5b56b5238062aa78e9bdeadf5 ./x86-windows-static/include/pulsar/ReaderConfiguration.h Added: dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.1.0-candidate-1/x86-windows-static/include/pulsar/Result.h ============================================================================== --- dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.1.0-candidate-1/x86-windows-static/include/pulsar/Result.h (added) +++ dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.1.0-candidate-1/x86-windows-static/include/pulsar/Result.h Wed Nov 23 09:18:55 2022 @@ -0,0 +1,103 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +#ifndef ERROR_HPP_ +#define ERROR_HPP_ + +#include <pulsar/defines.h> + +#include <iosfwd> + +namespace pulsar { + +/** + * Collection of return codes + */ +enum Result +{ + ResultRetryable = -1, /// An internal error code used for retry + ResultOk = 0, /// Operation successful + + ResultUnknownError, /// Unknown error happened on broker + + ResultInvalidConfiguration, /// Invalid configuration + + ResultTimeout, /// Operation timed out + ResultLookupError, /// Broker lookup failed + ResultConnectError, /// Failed to connect to broker + ResultReadError, /// Failed to read from socket + + ResultAuthenticationError, /// Authentication failed on broker + ResultAuthorizationError, /// Client is not authorized to create producer/consumer + ResultErrorGettingAuthenticationData, /// Client cannot find authorization data + + ResultBrokerMetadataError, /// Broker failed in updating metadata + ResultBrokerPersistenceError, /// Broker failed to persist entry + ResultChecksumError, /// Corrupt message checksum failure + + ResultConsumerBusy, /// Exclusive consumer is already connected + ResultNotConnected, /// Producer/Consumer is not currently connected to broker + ResultAlreadyClosed, /// Producer/Consumer is already closed and not accepting any operation + + ResultInvalidMessage, /// Error in publishing an already used message + + ResultConsumerNotInitialized, /// Consumer is not initialized + ResultProducerNotInitialized, /// Producer is not initialized + ResultProducerBusy, /// Producer with same name is already connected + ResultTooManyLookupRequestException, /// Too Many concurrent LookupRequest + + ResultInvalidTopicName, /// Invalid topic name + ResultInvalidUrl, /// Client Initialized with Invalid Broker Url (VIP Url passed to Client Constructor) + ResultServiceUnitNotReady, /// Service Unit unloaded between client did lookup and producer/consumer got + /// created + ResultOperationNotSupported, + ResultProducerBlockedQuotaExceededError, /// Producer is blocked + ResultProducerBlockedQuotaExceededException, /// Producer is getting exception + ResultProducerQueueIsFull, /// Producer queue is full + ResultMessageTooBig, /// Trying to send a messages exceeding the max size + ResultTopicNotFound, /// Topic not found + ResultSubscriptionNotFound, /// Subscription not found + ResultConsumerNotFound, /// Consumer not found + ResultUnsupportedVersionError, /// Error when an older client/version doesn't support a required feature + ResultTopicTerminated, /// Topic was already terminated + ResultCryptoError, /// Error when crypto operation fails + + ResultIncompatibleSchema, /// Specified schema is incompatible with the topic's schema + ResultConsumerAssignError, /// Error when a new consumer connected but can't assign messages to this + /// consumer + ResultCumulativeAcknowledgementNotAllowedError, /// Not allowed to call cumulativeAcknowledgement in + /// Shared and Key_Shared subscription mode + ResultTransactionCoordinatorNotFoundError, /// Transaction coordinator not found + ResultInvalidTxnStatusError, /// Invalid txn status error + ResultNotAllowedError, /// Not allowed + ResultTransactionConflict, /// Transaction ack conflict + ResultTransactionNotFound, /// Transaction not found + ResultProducerFenced, /// Producer was fenced by broker + + ResultMemoryBufferIsFull, /// Client-wide memory limit has been reached + + ResultInterrupted, /// Interrupted while waiting to dequeue +}; + +// Return string representation of result code +PULSAR_PUBLIC const char* strResult(Result result); + +PULSAR_PUBLIC std::ostream& operator<<(std::ostream& s, pulsar::Result result); +} // namespace pulsar + +#endif /* ERROR_HPP_ */ Added: dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.1.0-candidate-1/x86-windows-static/include/pulsar/Result.h.asc ============================================================================== --- dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.1.0-candidate-1/x86-windows-static/include/pulsar/Result.h.asc (added) +++ dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.1.0-candidate-1/x86-windows-static/include/pulsar/Result.h.asc Wed Nov 23 09:18:55 2022 @@ -0,0 +1,16 @@ +-----BEGIN PGP SIGNATURE----- + +iQIzBAABCgAdFiEE6ItqSN52cCOQDJEjT0AbyNP5+1UFAmN9xYsACgkQT0AbyNP5 ++1Xbag/9HiFHsJNCGovGv4ADm2CYEn35x/SoTkUP4uSc2GP4TcUlIPzSanvCQEaN +3V+m48JHhH2ul+yf1pSkVEffUAcfvsAEkhFrOZV+mKOvCto1ZhAig6+QKquPfJFV +XVRSHFTAnpwhOYfrLFjsQVlRO0r2KzZ5hi9ZBc3Tg8n20z4Ljbo24zTTqjyDiIQH +zeWKe7s/FO8+VePw7q66odpej2FQDkJ5EF8uVzOAzr5FGQRYw8Q18+wdxUNvzBjo +UDSumcb++XXpSSlj6rMauuSuB+PNgdGyqlNZfbZiYXebnvTQif9++mhrwBVRJ4Yt +5QnoXa0xYgAHymatVsV3n+Npfmk0ZzZ+eKPx6c3dLaHLn421UUCk/tLeFWVmXGXR +Lp63vYESAS27SdiL+BoDiyBHw3/4C4oXwFOT5Wng2ZNjXFdiloN2XOMTF/ZTg2ZN +qcyu8sV5k7x66kO+WrixbL+7F61ej/8Z9/zMqnsByx0vZ5LAYnAVLA9H7fi25g3x +wqmD6f5+nvlOTPIaZlleNOns9uNYzEFzHcw+5n9dv0PSfhYhuZ4PjNYCujtn3oPm +RZKzhCbitXDbA1JdI/SvB0YXpZgsqtvrSeSQTr5szdFliZwb/q4NI10urmlKDi4c +qTNoM9f4Tb2eVeA30UZsyrJaw2whpZzzjfsAexXwVQM0z1E7gjg= +=ezrB +-----END PGP SIGNATURE----- Added: dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.1.0-candidate-1/x86-windows-static/include/pulsar/Result.h.sha512 ============================================================================== --- dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.1.0-candidate-1/x86-windows-static/include/pulsar/Result.h.sha512 (added) +++ dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.1.0-candidate-1/x86-windows-static/include/pulsar/Result.h.sha512 Wed Nov 23 09:18:55 2022 @@ -0,0 +1 @@ +55d254c16dacecf099ccf89b7bbf7f8d8587fe00800d8bbf1001f6ec22a3a50b2330c76b96bbfaddd21f1e3db438f6615fef9211c63764cb5c6067ec7c54f483 ./x86-windows-static/include/pulsar/Result.h Added: dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.1.0-candidate-1/x86-windows-static/include/pulsar/Schema.h ============================================================================== --- dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.1.0-candidate-1/x86-windows-static/include/pulsar/Schema.h (added) +++ dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.1.0-candidate-1/x86-windows-static/include/pulsar/Schema.h Wed Nov 23 09:18:55 2022 @@ -0,0 +1,205 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +#pragma once + +#include <pulsar/defines.h> + +#include <iosfwd> +#include <map> +#include <memory> +#include <string> + +namespace pulsar { + +/** + * Encoding types of supported KeyValueSchema for Pulsar messages. + */ +enum class KeyValueEncodingType +{ + /** + * Key is stored as message key, while value is stored as message payload. + */ + SEPARATED, + + /** + * Key and value are stored as message payload. + */ + INLINE +}; + +// Return string representation of result code +PULSAR_PUBLIC const char *strEncodingType(pulsar::KeyValueEncodingType encodingType); + +PULSAR_PUBLIC KeyValueEncodingType enumEncodingType(std::string encodingTypeStr); + +enum SchemaType +{ + /** + * No schema defined + */ + NONE = 0, + + /** + * Simple String encoding with UTF-8 + */ + STRING = 1, + + /** + * JSON object encoding and validation + */ + JSON = 2, + + /** + * Protobuf message encoding and decoding + */ + PROTOBUF = 3, + + /** + * Serialize and deserialize via Avro + */ + AVRO = 4, + + /** + * A 8-byte integer. + */ + INT8 = 6, + + /** + * A 16-byte integer. + */ + INT16 = 7, + + /** + * A 32-byte integer. + */ + INT32 = 8, + + /** + * A 64-byte integer. + */ + INT64 = 9, + + /** + * A float number. + */ + FLOAT = 10, + + /** + * A double number + */ + DOUBLE = 11, + + /** + * A Schema that contains Key Schema and Value Schema. + */ + KEY_VALUE = 15, + + /** + * Protobuf native schema based on Descriptor. + */ + PROTOBUF_NATIVE = 20, + + /** + * A bytes array. + */ + BYTES = -1, + + /** + * Auto Consume Type. + */ + AUTO_CONSUME = -3, + + /** + * Auto Publish Type. + */ + AUTO_PUBLISH = -4, +}; + +// Return string representation of result code +PULSAR_PUBLIC const char *strSchemaType(SchemaType schemaType); + +class SchemaInfoImpl; + +typedef std::map<std::string, std::string> StringMap; + +/** + * Encapsulates data around the schema definition + */ +class PULSAR_PUBLIC SchemaInfo { + public: + /** + * The default constructor with following configs: + * - schemaType: SchemaType::BYTES + * - name: "BYTES" + * - schema: "" + * - properties: {} + * + * @see SchemaInfo(SchemaType schemaType, const std::string& name, const std::string& schema, const + * StringMap& properties) + */ + SchemaInfo(); + + /** + * @param schemaType the schema type + * @param name the name of the schema definition + * @param schema the schema definition as a JSON string + * @param properties a map of custom defined properties attached to the schema + */ + SchemaInfo(SchemaType schemaType, const std::string &name, const std::string &schema, + const StringMap &properties = StringMap()); + + /** + * @param keySchema the key schema. + * @param valueSchema the value schema. + * @param keyValueEncodingType Encoding types of supported KeyValueSchema for Pulsar messages. + */ + SchemaInfo(const SchemaInfo &keySchema, const SchemaInfo &valueSchema, + const KeyValueEncodingType &keyValueEncodingType = KeyValueEncodingType::INLINE); + + /** + * @return the schema type + */ + SchemaType getSchemaType() const; + + /** + * @return the name of the schema definition + */ + const std::string &getName() const; + + /** + * @return the schema definition as a JSON string + */ + const std::string &getSchema() const; + + /** + * @return a map of custom defined properties attached to the schema + */ + const StringMap &getProperties() const; + + private: + typedef std::shared_ptr<SchemaInfoImpl> SchemaInfoImplPtr; + SchemaInfoImplPtr impl_; + static constexpr uint32_t INVALID_SIZE = 0xFFFFFFFF; +}; + +} // namespace pulsar + +PULSAR_PUBLIC std::ostream &operator<<(std::ostream &s, pulsar::SchemaType schemaType); + +PULSAR_PUBLIC std::ostream &operator<<(std::ostream &s, pulsar::KeyValueEncodingType encodingType); Added: dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.1.0-candidate-1/x86-windows-static/include/pulsar/Schema.h.asc ============================================================================== --- dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.1.0-candidate-1/x86-windows-static/include/pulsar/Schema.h.asc (added) +++ dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.1.0-candidate-1/x86-windows-static/include/pulsar/Schema.h.asc Wed Nov 23 09:18:55 2022 @@ -0,0 +1,16 @@ +-----BEGIN PGP SIGNATURE----- + +iQIzBAABCgAdFiEE6ItqSN52cCOQDJEjT0AbyNP5+1UFAmN9xYwACgkQT0AbyNP5 ++1U41Q//X8wfytZeIAYWSazOWxe6yxbE7nfpVXUglf2iG11StWQBE+ccFLQYSiC7 +2EZd6P0hUZ7ynyAolscoWvW4gT2BTXkziwofOWKq7WmyBusC9ZRBHtz8UmOQN04D +Fe6ckYXOdSD9ZLI034aX3BjX6mAsjZEOiF1GTVlgvQlK+/PRoh3q+Qmrnnmc/VA6 +zTU5B6UEWXxkKmxdWt9N1RIJN9ZZbStb+r8C2s3olmqde5JLIjzLIpBxZ1yIOMmQ +2B3ciqIynvEJusJdr5YkT74Ov8HhvXiJ7PYDPbvn2J/RuSz1kIYGeYqZpMemfEEm +LWQL3adDFq1Ijx8w36oCLZwIw7VfJLtuUqxZ3eemgRhRVo97mrG5/CijTGY2C8Hr +VX1f77PdG1VbUNXz+7jZYBeUZyh35oZl5Bb3yoSg2Mq+Oz7uOmCXH/DA2QfiNLg3 +maVInD5ET637qoDvEeD0qQCaW0qx5mkuXbcOc4GIsxVgDxbWGyULQMvRP9do1wa5 +MRbLwODjyZ8xmR25Yfj2+BWLNo0e0Zz/z4aLFBn+CNbl29FYY37hT1Fhn4XJK6PB +r5jr6PkUl4RXaWMUmh0XgXVPnXBtdbMZhESrvtRq7G6jKgqlO22Me1MA8uuo4AKo +L909JQ3hcDi7DhOL65pFy7b3wdowdzZV13+dZqfL3PIQ988AQiQ= +=3HA0 +-----END PGP SIGNATURE----- Added: dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.1.0-candidate-1/x86-windows-static/include/pulsar/Schema.h.sha512 ============================================================================== --- dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.1.0-candidate-1/x86-windows-static/include/pulsar/Schema.h.sha512 (added) +++ dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.1.0-candidate-1/x86-windows-static/include/pulsar/Schema.h.sha512 Wed Nov 23 09:18:55 2022 @@ -0,0 +1 @@ +e639835b1d823733cace08c09690906d280c9c318a4a76795b80ceb5e51e0251df274b58ad73ac350d6946f7c068762ad47bf6e41d36963f43d0d7ca6b6bcbc7 ./x86-windows-static/include/pulsar/Schema.h Added: dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.1.0-candidate-1/x86-windows-static/include/pulsar/TopicMetadata.h ============================================================================== --- dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.1.0-candidate-1/x86-windows-static/include/pulsar/TopicMetadata.h (added) +++ dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.1.0-candidate-1/x86-windows-static/include/pulsar/TopicMetadata.h Wed Nov 23 09:18:55 2022 @@ -0,0 +1,39 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +#ifndef TOPIC_METADATA_HPP_ +#define TOPIC_METADATA_HPP_ + +#include <pulsar/defines.h> + +namespace pulsar { +/** + * Metadata of a topic that can be used for message routing. + */ +class PULSAR_PUBLIC TopicMetadata { + public: + virtual ~TopicMetadata() {} + + /** + * @return the number of partitions + */ + virtual int getNumPartitions() const = 0; +}; +} // namespace pulsar + +#endif /* TOPIC_METADATA_HPP_ */ Added: dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.1.0-candidate-1/x86-windows-static/include/pulsar/TopicMetadata.h.asc ============================================================================== --- dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.1.0-candidate-1/x86-windows-static/include/pulsar/TopicMetadata.h.asc (added) +++ dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.1.0-candidate-1/x86-windows-static/include/pulsar/TopicMetadata.h.asc Wed Nov 23 09:18:55 2022 @@ -0,0 +1,16 @@ +-----BEGIN PGP SIGNATURE----- + +iQIzBAABCgAdFiEE6ItqSN52cCOQDJEjT0AbyNP5+1UFAmN9xY4ACgkQT0AbyNP5 ++1V/ag/+ImVfses1yF4Dx/tpQMsrDpPxjDrLg/3BHQqObHSH058iAqZSbinTYqQ7 +/gv+X0FAwsZb4YMqZNcPExwvyxEX1BiLvvdj/jBiZe20yipl8u8LsRQFxIi2tvcC +R4WRZ/hycA5DrgmFc6FQFaLso1iaXLXlE68+QSScNHpqa/+1y7U3uUwyKZ+wCMtS +Jjb0xGYsZXhRCDeIV4pvUvOZKd/QU7Dm0nCRTTDrW0OP4+yjh8hBX6HBrVdqSDuB +PHOYJyy2jNbrLufXaWUyapNg2HrSDoCxjqtiTt6cjvsuqQZLXTKFjrEOFjVONeXl +vMqfwux68ovh0XxQaJiEjBK/hmc38J+QJDRosDBae8sPeb4O3X0yZK4wxp0pt2at +lOvZ993kcvwYokQHpm2NsHPCq+byLkPlVvY8lmpT/ggjYAp13sWLZl9Tlzq2MiTE +aZlTuDf+sGUG3VOdfs0RJjMr3uBRabal3wXmX1tFK3tJDWA8lJNhCLjZp+Khg/b0 +p4ohlLf0kzQNMXZ8wyE68J4psU+I+fkpWp2tk2UeV9+9wlXYInoz2/+LS3pW5YZh +Yqj+ykSgh+yAb+aGMrsw0mRX8HY23Je0DJlyv9b6tel3505FJgSbhK43lqKGIQju +Qqk1dtZ5SgBX/lPwfWXcTgE/gUouK1L6bATwjza8JF391DP2sLo= +=fO+Z +-----END PGP SIGNATURE----- Added: dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.1.0-candidate-1/x86-windows-static/include/pulsar/TopicMetadata.h.sha512 ============================================================================== --- dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.1.0-candidate-1/x86-windows-static/include/pulsar/TopicMetadata.h.sha512 (added) +++ dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.1.0-candidate-1/x86-windows-static/include/pulsar/TopicMetadata.h.sha512 Wed Nov 23 09:18:55 2022 @@ -0,0 +1 @@ +cdbc3d4482794955af446aa6f828122ea0f040bd6d329ae710eee7e81dd44a2991507f35aff11007142ad72dd335019cc2d350745e68b15afc7561b702f3d250 ./x86-windows-static/include/pulsar/TopicMetadata.h Added: dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.1.0-candidate-1/x86-windows-static/include/pulsar/c/authentication.h ============================================================================== --- dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.1.0-candidate-1/x86-windows-static/include/pulsar/c/authentication.h (added) +++ dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.1.0-candidate-1/x86-windows-static/include/pulsar/c/authentication.h Wed Nov 23 09:18:55 2022 @@ -0,0 +1,53 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +#pragma once + +#include <pulsar/defines.h> + +#ifdef __cplusplus +extern "C" { +#endif + +typedef struct _pulsar_authentication pulsar_authentication_t; + +typedef char *(*token_supplier)(void *); + +PULSAR_PUBLIC pulsar_authentication_t *pulsar_authentication_create(const char *dynamicLibPath, + const char *authParamsString); + +PULSAR_PUBLIC pulsar_authentication_t *pulsar_authentication_tls_create(const char *certificatePath, + const char *privateKeyPath); + +PULSAR_PUBLIC pulsar_authentication_t *pulsar_authentication_token_create(const char *token); +PULSAR_PUBLIC pulsar_authentication_t *pulsar_authentication_token_create_with_supplier( + token_supplier tokenSupplier, void *ctx); + +PULSAR_PUBLIC pulsar_authentication_t *pulsar_authentication_basic_create(const char *username, + const char *password); + +PULSAR_PUBLIC pulsar_authentication_t *pulsar_authentication_athenz_create(const char *authParamsString); + +PULSAR_PUBLIC pulsar_authentication_t *pulsar_authentication_oauth2_create(const char *authParamsString); + +PULSAR_PUBLIC void pulsar_authentication_free(pulsar_authentication_t *authentication); + +#ifdef __cplusplus +} +#endif \ No newline at end of file Added: dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.1.0-candidate-1/x86-windows-static/include/pulsar/c/authentication.h.asc ============================================================================== --- dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.1.0-candidate-1/x86-windows-static/include/pulsar/c/authentication.h.asc (added) +++ dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.1.0-candidate-1/x86-windows-static/include/pulsar/c/authentication.h.asc Wed Nov 23 09:18:55 2022 @@ -0,0 +1,16 @@ +-----BEGIN PGP SIGNATURE----- + +iQIzBAABCgAdFiEE6ItqSN52cCOQDJEjT0AbyNP5+1UFAmN9xZEACgkQT0AbyNP5 ++1X21w//UWp65Wr+kO7xYNMUHbuV/gfoChzVVQByIuorPp/EhfeoHYnVLXK/3hoy +cEJWUBcP5HRQZyJRDpv1NaOSWQz6kP7w7gY6lZdPBtQcrqCNBXnaOFMj/t4UmAai +XC+gerNRNb1vmDbehPkKkKpPU5Jt1BoCX1xobiA0Qvi91d1pBgKb8hFINXdnTN5i +7gBed1G2S1N3VW84dkp3ILu43ByHIuhAFZwcvpXP3cBoCc/cn2sxm++pPHqjn5AO +4DFjDB8zoq43i2VO0ChC+by3D4MzsbUMPubJsxHt/tThy333GB1uA4NhKYhqgHhe +7LWjBZXh9/T5UQfIvO85q1sfc1VYUB/cm8Yu1LnmZmyf3Ax7OsBQaxNDi/FYf0j6 +eS+nOFoA0dpk9QsYe+7gosB4RRb3mVFgyA9/TuEo4WyxJNm+WNGZ7t80b1YtI5B8 +6Vcxvuqx+q5ThZcs+ocxJZ5ejW8eOcMvzEr8IDv4NDaAkw/WU89GaP1RZmnEmB/M +8THWufmoCDGwSDUNXCQN0HCiNdHJ6/kHwy0DN/pADQOEA3U3oTzKoaFZHuAVuykS +nL40SWNZCJxuiTMhmOqOEW8zkoR+EtHOa5Tkmx0lhkDJNoKyZX0bmvwWsc+cPnqv +DtCLSSp1mb06Tt7Zf/a86HB5MZNlGEesb/+WbixpIxVHIe4Tes8= +=9HwN +-----END PGP SIGNATURE----- Added: dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.1.0-candidate-1/x86-windows-static/include/pulsar/c/authentication.h.sha512 ============================================================================== --- dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.1.0-candidate-1/x86-windows-static/include/pulsar/c/authentication.h.sha512 (added) +++ dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.1.0-candidate-1/x86-windows-static/include/pulsar/c/authentication.h.sha512 Wed Nov 23 09:18:55 2022 @@ -0,0 +1 @@ +72731c4c1e8a5c6b6daa415731bd51419797e49f3f9bea22e1439e76fc40154dc585dd3722628d1c757621f34ce3ccd592d776663683913abd749b7722f3da36 ./x86-windows-static/include/pulsar/c/authentication.h Added: dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.1.0-candidate-1/x86-windows-static/include/pulsar/c/client.h ============================================================================== --- dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.1.0-candidate-1/x86-windows-static/include/pulsar/c/client.h (added) +++ dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.1.0-candidate-1/x86-windows-static/include/pulsar/c/client.h Wed Nov 23 09:18:55 2022 @@ -0,0 +1,192 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +#pragma once + +#include <pulsar/c/client_configuration.h> +#include <pulsar/c/consumer.h> +#include <pulsar/c/consumer_configuration.h> +#include <pulsar/c/message.h> +#include <pulsar/c/message_id.h> +#include <pulsar/c/producer.h> +#include <pulsar/c/producer_configuration.h> +#include <pulsar/c/reader.h> +#include <pulsar/c/reader_configuration.h> +#include <pulsar/c/result.h> +#include <pulsar/c/string_list.h> +#include <pulsar/defines.h> + +#ifdef __cplusplus +extern "C" { +#endif + +typedef struct _pulsar_client pulsar_client_t; +typedef struct _pulsar_producer pulsar_producer_t; +typedef struct _pulsar_string_list pulsar_string_list_t; + +typedef struct _pulsar_client_configuration pulsar_client_configuration_t; +typedef struct _pulsar_producer_configuration pulsar_producer_configuration_t; + +typedef void (*pulsar_create_producer_callback)(pulsar_result result, pulsar_producer_t *producer, void *ctx); + +typedef void (*pulsar_subscribe_callback)(pulsar_result result, pulsar_consumer_t *consumer, void *ctx); +typedef void (*pulsar_reader_callback)(pulsar_result result, pulsar_reader_t *reader, void *ctx); +typedef void (*pulsar_get_partitions_callback)(pulsar_result result, pulsar_string_list_t *partitions, + void *ctx); + +typedef void (*pulsar_close_callback)(pulsar_result result, void *ctx); + +/** + * Create a Pulsar client object connecting to the specified cluster address and using the specified + * configuration. + * + * @param serviceUrl the Pulsar endpoint to use (eg: pulsar://broker-example.com:6650) + * @param clientConfiguration the client configuration to use + */ +PULSAR_PUBLIC pulsar_client_t *pulsar_client_create(const char *serviceUrl, + const pulsar_client_configuration_t *clientConfiguration); + +/** + * Create a producer with default configuration + * + * @see createProducer(const std::string&, const ProducerConfiguration&, Producer&) + * + * @param topic the topic where the new producer will publish + * @param producer a non-const reference where the new producer will be copied + * @return ResultOk if the producer has been successfully created + * @return ResultError if there was an error + */ +PULSAR_PUBLIC pulsar_result pulsar_client_create_producer(pulsar_client_t *client, const char *topic, + const pulsar_producer_configuration_t *conf, + pulsar_producer_t **producer); + +PULSAR_PUBLIC void pulsar_client_create_producer_async(pulsar_client_t *client, const char *topic, + const pulsar_producer_configuration_t *conf, + pulsar_create_producer_callback callback, void *ctx); + +PULSAR_PUBLIC pulsar_result pulsar_client_subscribe(pulsar_client_t *client, const char *topic, + const char *subscriptionName, + const pulsar_consumer_configuration_t *conf, + pulsar_consumer_t **consumer); + +PULSAR_PUBLIC void pulsar_client_subscribe_async(pulsar_client_t *client, const char *topic, + const char *subscriptionName, + const pulsar_consumer_configuration_t *conf, + pulsar_subscribe_callback callback, void *ctx); + +/** + * Create a consumer to multiple topics under the same namespace with default configuration + * + * @see subscribe(const std::vector<std::string>&, const std::string&, Consumer& consumer) + * + * @param topics a list of topic names to subscribe to + * @param topicsCount the number of topics + * @param subscriptionName the subscription name + * @param consumer a non-const reference where the new consumer will be copied + * @return ResultOk if the consumer has been successfully created + * @return ResultError if there was an error + */ +PULSAR_PUBLIC pulsar_result pulsar_client_subscribe_multi_topics(pulsar_client_t *client, const char **topics, + int topicsCount, + const char *subscriptionName, + const pulsar_consumer_configuration_t *conf, + pulsar_consumer_t **consumer); + +PULSAR_PUBLIC void pulsar_client_subscribe_multi_topics_async(pulsar_client_t *client, const char **topics, + int topicsCount, const char *subscriptionName, + const pulsar_consumer_configuration_t *conf, + pulsar_subscribe_callback callback, void *ctx); + +/** + * Create a consumer to multiple (which match given topicPattern) with default configuration + * + * @see subscribeWithRegex(const std::string&, const std::string&, Consumer& consumer) + * + * @param topicPattern topic regex topics should match to subscribe to + * @param subscriptionName the subscription name + * @param consumer a non-const reference where the new consumer will be copied + * @return ResultOk if the consumer has been successfully created + * @return ResultError if there was an error + */ +PULSAR_PUBLIC pulsar_result pulsar_client_subscribe_pattern(pulsar_client_t *client, const char *topicPattern, + const char *subscriptionName, + const pulsar_consumer_configuration_t *conf, + pulsar_consumer_t **consumer); + +PULSAR_PUBLIC void pulsar_client_subscribe_pattern_async(pulsar_client_t *client, const char *topicPattern, + const char *subscriptionName, + const pulsar_consumer_configuration_t *conf, + pulsar_subscribe_callback callback, void *ctx); + +/** + * Create a topic reader with given {@code ReaderConfiguration} for reading messages from the specified + * topic. + * <p> + * The Reader provides a low-level abstraction that allows for manual positioning in the topic, without + * using a + * subscription. Reader can only work on non-partitioned topics. + * <p> + * The initial reader positioning is done by specifying a message id. The options are: + * <ul> + * <li><code>MessageId.earliest</code> : Start reading from the earliest message available in the topic + * <li><code>MessageId.latest</code> : Start reading from the end topic, only getting messages published + * after the + * reader was created + * <li><code>MessageId</code> : When passing a particular message id, the reader will position itself on + * that + * specific position. The first message to be read will be the message next to the specified messageId. + * </ul> + * + * @param topic + * The name of the topic where to read + * @param startMessageId + * The message id where the reader will position itself. The first message returned will be the + * one after + * the specified startMessageId + * @param conf + * The {@code ReaderConfiguration} object + * @return The {@code Reader} object + */ +PULSAR_PUBLIC pulsar_result pulsar_client_create_reader(pulsar_client_t *client, const char *topic, + const pulsar_message_id_t *startMessageId, + pulsar_reader_configuration_t *conf, + pulsar_reader_t **reader); + +PULSAR_PUBLIC void pulsar_client_create_reader_async(pulsar_client_t *client, const char *topic, + const pulsar_message_id_t *startMessageId, + pulsar_reader_configuration_t *conf, + pulsar_reader_callback callback, void *ctx); + +PULSAR_PUBLIC pulsar_result pulsar_client_get_topic_partitions(pulsar_client_t *client, const char *topic, + pulsar_string_list_t **partitions); + +PULSAR_PUBLIC void pulsar_client_get_topic_partitions_async(pulsar_client_t *client, const char *topic, + pulsar_get_partitions_callback callback, + void *ctx); + +PULSAR_PUBLIC pulsar_result pulsar_client_close(pulsar_client_t *client); + +PULSAR_PUBLIC void pulsar_client_close_async(pulsar_client_t *client, pulsar_close_callback callback, + void *ctx); + +PULSAR_PUBLIC void pulsar_client_free(pulsar_client_t *client); + +#ifdef __cplusplus +} +#endif Added: dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.1.0-candidate-1/x86-windows-static/include/pulsar/c/client.h.asc ============================================================================== --- dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.1.0-candidate-1/x86-windows-static/include/pulsar/c/client.h.asc (added) +++ dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.1.0-candidate-1/x86-windows-static/include/pulsar/c/client.h.asc Wed Nov 23 09:18:55 2022 @@ -0,0 +1,16 @@ +-----BEGIN PGP SIGNATURE----- + +iQIzBAABCgAdFiEE6ItqSN52cCOQDJEjT0AbyNP5+1UFAmN9xY8ACgkQT0AbyNP5 ++1VaHxAAkUil4paLxZsOY1wwCRzt6+qNV6xJoEBOwAzrk0WrGL6fgj7OYAL+RW2O +UT3ZZQlDmarKj/77+hETwMa4hyyTxBDzOO7dR53TwcxYpIUdzxkr+K+2s1AOYDRc +U1rrGKSYO6Zq9KIx4tN9whmDe99bkKXHhg+XXKk2wxDAssZkHapFWfihzTJEwbbN +n958SPM3InCZWep7ocNieMtkDwtZHTOpvXdpMwLZBF0nZak5tOU9WvoNMGwckukK +8WHDqoqa/mxiylQd4somiPlEq/gtiPVakYp94j2rFuL9K2YNqioOXdYC9g22IcGM +JnLzocas3t8vHgQIJvVRlqHM112H0rPiPvzU34HfBNy+ldrlFI1eaxf+OVpQmbtc +4zOm+/MWrS94WOMRS3jOZ8J/LfTA1J6/shouOG8PDQczZ8D3TqlNP6f2A+yrckVd +5kJlzF5W3FXs+xX4CFI7Q0JJlw1/0xIg6PO5p2Nga8nJooa61+qySs0q1NRDvlax +8UAof1wZ9wWR5SNKZjQzpqpXFcwpjs4AhsN9FmH89t56wcmm3ff1USxhCAAh9cjB +fVlQBwYR4358DmVvISVQSyqr/PKBoJZgu7iChbfnUN/6L0BhQGw80+/d1uafou6M +gCiKAFVMrx0t3pUxNrosJsHpgACjdSjWxEzIfkob8MetFNz3SZk= +=OYxo +-----END PGP SIGNATURE----- Added: dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.1.0-candidate-1/x86-windows-static/include/pulsar/c/client.h.sha512 ============================================================================== --- dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.1.0-candidate-1/x86-windows-static/include/pulsar/c/client.h.sha512 (added) +++ dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.1.0-candidate-1/x86-windows-static/include/pulsar/c/client.h.sha512 Wed Nov 23 09:18:55 2022 @@ -0,0 +1 @@ +40b6df5e7456c07ffcfab7709b6837d7cff45387fa50db2940d3295711f5468b06015f1864675fafbf992417d7ed43091c02caace30eb2f4992c3badc2186f48 ./x86-windows-static/include/pulsar/c/client.h Added: dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.1.0-candidate-1/x86-windows-static/include/pulsar/c/client_configuration.h ============================================================================== --- dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.1.0-candidate-1/x86-windows-static/include/pulsar/c/client_configuration.h (added) +++ dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.1.0-candidate-1/x86-windows-static/include/pulsar/c/client_configuration.h Wed Nov 23 09:18:55 2022 @@ -0,0 +1,173 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +#pragma once + +#include <pulsar/defines.h> + +#ifdef __cplusplus +extern "C" { +#endif + +typedef enum +{ + pulsar_DEBUG = 0, + pulsar_INFO = 1, + pulsar_WARN = 2, + pulsar_ERROR = 3 +} pulsar_logger_level_t; + +typedef void (*pulsar_logger)(pulsar_logger_level_t level, const char *file, int line, const char *message, + void *ctx); + +typedef struct _pulsar_client_configuration pulsar_client_configuration_t; +typedef struct _pulsar_authentication pulsar_authentication_t; + +PULSAR_PUBLIC pulsar_client_configuration_t *pulsar_client_configuration_create(); + +PULSAR_PUBLIC void pulsar_client_configuration_free(pulsar_client_configuration_t *conf); + +/** + * Set the authentication method to be used with the broker + * + * @param authentication the authentication data to use + */ +PULSAR_PUBLIC void pulsar_client_configuration_set_auth(pulsar_client_configuration_t *conf, + pulsar_authentication_t *authentication); + +/** + * Configure a limit on the amount of memory that will be allocated by this client instance. + * Setting this to 0 will disable the limit. By default this is disabled. + * + * @param memoryLimitBytes the memory limit + */ +PULSAR_PUBLIC void pulsar_client_configuration_set_memory_limit(pulsar_client_configuration_t *conf, + unsigned long long memoryLimitBytes); + +/** + * @return the client memory limit in bytes + */ +PULSAR_PUBLIC unsigned long long pulsar_client_configuration_get_memory_limit( + pulsar_client_configuration_t *conf); + +/** + * Set timeout on client operations (subscribe, create producer, close, unsubscribe) + * Default is 30 seconds. + * + * @param timeout the timeout after which the operation will be considered as failed + */ +PULSAR_PUBLIC void pulsar_client_configuration_set_operation_timeout_seconds( + pulsar_client_configuration_t *conf, int timeout); + +/** + * @return the client operations timeout in seconds + */ +PULSAR_PUBLIC int pulsar_client_configuration_get_operation_timeout_seconds( + pulsar_client_configuration_t *conf); + +/** + * Set the number of IO threads to be used by the Pulsar client. Default is 1 + * thread. + * + * @param threads number of threads + */ +PULSAR_PUBLIC void pulsar_client_configuration_set_io_threads(pulsar_client_configuration_t *conf, + int threads); + +/** + * @return the number of IO threads to use + */ +PULSAR_PUBLIC int pulsar_client_configuration_get_io_threads(pulsar_client_configuration_t *conf); + +/** + * Set the number of threads to be used by the Pulsar client when delivering messages + * through message listener. Default is 1 thread per Pulsar client. + * + * If using more than 1 thread, messages for distinct MessageListener will be + * delivered in different threads, however a single MessageListener will always + * be assigned to the same thread. + * + * @param threads number of threads + */ +PULSAR_PUBLIC void pulsar_client_configuration_set_message_listener_threads( + pulsar_client_configuration_t *conf, int threads); + +/** + * @return the number of IO threads to use + */ +PULSAR_PUBLIC int pulsar_client_configuration_get_message_listener_threads( + pulsar_client_configuration_t *conf); + +/** + * Number of concurrent lookup-requests allowed on each broker-connection to prevent overload on broker. + * <i>(default: 50000)</i> It should be configured with higher value only in case of it requires to + * produce/subscribe on + * thousands of topic using created {@link PulsarClient} + * + * @param concurrentLookupRequest + */ +PULSAR_PUBLIC void pulsar_client_configuration_set_concurrent_lookup_request( + pulsar_client_configuration_t *conf, int concurrentLookupRequest); + +/** + * @return Get configured total allowed concurrent lookup-request. + */ +PULSAR_PUBLIC int pulsar_client_configuration_get_concurrent_lookup_request( + pulsar_client_configuration_t *conf); + +PULSAR_PUBLIC void pulsar_client_configuration_set_logger(pulsar_client_configuration_t *conf, + pulsar_logger logger, void *ctx); + +PULSAR_PUBLIC void pulsar_client_configuration_set_use_tls(pulsar_client_configuration_t *conf, int useTls); + +PULSAR_PUBLIC int pulsar_client_configuration_is_use_tls(pulsar_client_configuration_t *conf); + +PULSAR_PUBLIC void pulsar_client_configuration_set_tls_trust_certs_file_path( + pulsar_client_configuration_t *conf, const char *tlsTrustCertsFilePath); + +PULSAR_PUBLIC const char *pulsar_client_configuration_get_tls_trust_certs_file_path( + pulsar_client_configuration_t *conf); + +PULSAR_PUBLIC void pulsar_client_configuration_set_tls_allow_insecure_connection( + pulsar_client_configuration_t *conf, int allowInsecure); + +PULSAR_PUBLIC int pulsar_client_configuration_is_tls_allow_insecure_connection( + pulsar_client_configuration_t *conf); + +/* + * Initialize stats interval in seconds. Stats are printed and reset after every 'statsIntervalInSeconds'. + * Set to 0 in order to disable stats collection. + */ +PULSAR_PUBLIC void pulsar_client_configuration_set_stats_interval_in_seconds( + pulsar_client_configuration_t *conf, const unsigned int interval); + +PULSAR_PUBLIC int pulsar_client_configuration_is_validate_hostname(pulsar_client_configuration_t *conf); + +PULSAR_PUBLIC void pulsar_client_configuration_set_validate_hostname(pulsar_client_configuration_t *conf, + int validateHostName); + +/* + * Get the stats interval set in the client. + */ +PULSAR_PUBLIC const unsigned int pulsar_client_configuration_get_stats_interval_in_seconds( + pulsar_client_configuration_t *conf); + +#ifdef __cplusplus +} +#endif Added: dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.1.0-candidate-1/x86-windows-static/include/pulsar/c/client_configuration.h.asc ============================================================================== --- dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.1.0-candidate-1/x86-windows-static/include/pulsar/c/client_configuration.h.asc (added) +++ dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.1.0-candidate-1/x86-windows-static/include/pulsar/c/client_configuration.h.asc Wed Nov 23 09:18:55 2022 @@ -0,0 +1,16 @@ +-----BEGIN PGP SIGNATURE----- + +iQIzBAABCgAdFiEE6ItqSN52cCOQDJEjT0AbyNP5+1UFAmN9xZIACgkQT0AbyNP5 ++1WM1A/7BBnw0akkpZiWjuscMYAfuB0zThBLLBeYMVEjlmzJqCeUio68sVKH+XPp +4m/Fh9A9GHIBxXTeLFJ+oSdlE6dS7wtd5coKXzIVE9vzedVdc4Ct7D5X7Q3pnMXq +U7046Cqo1n9AeCK9PuTzSw4GaF0h7cLEhrf/TDFcxnONFYhRFNoLPq5bXUIVjmq1 +Ah9Vvmc5TnRFCAgJN3glL87EPtNTmTq7uI4zPNW9aLVktQHgZEvVuknImIaGjrIl +CWFR5Ez/W6rJnISIEh5Kpu1KbCkeLgUEnTCPYwmY1g89ylX7YuDhbTOhL1kP8uol +Qv5rglxdmmdY0bINyZbO/FpJdzFzZqKSRUVYAbCl02qA9cN7nB5FDkur1GWm8CpZ +Yrk6y7mz/WJn6VPM+W8quojDJ+4X84XLMTEJpfxyckY1CtBD7OdYroKItDajldp2 +1jL/aQXpN2e21TkAydEqGA446jzU3pagJszv5V7ZBvLE1mr/a9JWlkyZb4Mi8bi5 +tMHPAwDDITgEBDunzmdKF8j1I28eCkirYXtFHjPhKUe6VaoPajI00vsh423zoAZD +GnUPUp6L4a2Tw5ERIqdZBWlTqeAElOYPMM+T3S5H/zBbtsyrLWTeVGGlqWkT8ktX +U4lx2W8dQt9c400LGTQQ11oyqb7x2iOMvqyBfacFxYPSa+9zPYI= +=VRwQ +-----END PGP SIGNATURE----- Added: dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.1.0-candidate-1/x86-windows-static/include/pulsar/c/client_configuration.h.sha512 ============================================================================== --- dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.1.0-candidate-1/x86-windows-static/include/pulsar/c/client_configuration.h.sha512 (added) +++ dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.1.0-candidate-1/x86-windows-static/include/pulsar/c/client_configuration.h.sha512 Wed Nov 23 09:18:55 2022 @@ -0,0 +1 @@ +0dc43cec729e75e2c15b73f8a51157ececc86665c414349afab33693f980f69983e0daf1911d0894f78b61c799824addc3be467c49fe638063c3db3f2ad43f70 ./x86-windows-static/include/pulsar/c/client_configuration.h Added: dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.1.0-candidate-1/x86-windows-static/include/pulsar/c/consumer.h ============================================================================== --- dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.1.0-candidate-1/x86-windows-static/include/pulsar/c/consumer.h (added) +++ dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.1.0-candidate-1/x86-windows-static/include/pulsar/c/consumer.h Wed Nov 23 09:18:55 2022 @@ -0,0 +1,296 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +#pragma once + +#include <pulsar/defines.h> + +#ifdef __cplusplus +extern "C" { +#endif + +#include <pulsar/c/message.h> +#include <pulsar/c/result.h> +#include <stdint.h> + +typedef struct _pulsar_consumer pulsar_consumer_t; + +typedef void (*pulsar_result_callback)(pulsar_result, void *); + +typedef void (*pulsar_receive_callback)(pulsar_result result, pulsar_message_t *msg, void *ctx); + +/** + * @return the topic this consumer is subscribed to + */ +PULSAR_PUBLIC const char *pulsar_consumer_get_topic(pulsar_consumer_t *consumer); + +/** + * @return the consumer name + */ +PULSAR_PUBLIC const char *pulsar_consumer_get_subscription_name(pulsar_consumer_t *consumer); + +/** + * Unsubscribe the current consumer from the topic. + * + * This method will block until the operation is completed. Once the consumer is + * unsubscribed, no more messages will be received and subsequent new messages + * will not be retained for this consumer. + * + * This consumer object cannot be reused. + * + * @see asyncUnsubscribe + * @return Result::ResultOk if the unsubscribe operation completed successfully + * @return Result::ResultError if the unsubscribe operation failed + */ +PULSAR_PUBLIC pulsar_result pulsar_consumer_unsubscribe(pulsar_consumer_t *consumer); + +/** + * Asynchronously unsubscribe the current consumer from the topic. + * + * This method will block until the operation is completed. Once the consumer is + * unsubscribed, no more messages will be received and subsequent new messages + * will not be retained for this consumer. + * + * This consumer object cannot be reused. + * + * @param callback the callback to get notified when the operation is complete + */ +PULSAR_PUBLIC void pulsar_consumer_unsubscribe_async(pulsar_consumer_t *consumer, + pulsar_result_callback callback, void *ctx); + +/** + * Receive a single message. + * + * If a message is not immediately available, this method will block until a new + * message is available. + * + * @param msg a non-const reference where the received message will be copied + * @return ResultOk when a message is received + * @return ResultInvalidConfiguration if a message listener had been set in the configuration + */ +PULSAR_PUBLIC pulsar_result pulsar_consumer_receive(pulsar_consumer_t *consumer, pulsar_message_t **msg); + +/** + * + * @param msg a non-const reference where the received message will be copied + * @param timeoutMs the receive timeout in milliseconds + * @return ResultOk if a message was received + * @return ResultTimeout if the receive timeout was triggered + * @return ResultInvalidConfiguration if a message listener had been set in the configuration + */ +PULSAR_PUBLIC pulsar_result pulsar_consumer_receive_with_timeout(pulsar_consumer_t *consumer, + pulsar_message_t **msg, int timeoutMs); + +/** + * Asynchronously receive a single message. + * + * This method will initiate the operation and return immediately. The provided callback + * will be triggered when the operation is complete. + * + * @param callback callback that will be triggered when the message is available + */ +PULSAR_PUBLIC void pulsar_consumer_receive_async(pulsar_consumer_t *consumer, + pulsar_receive_callback callback, void *ctx); + +/** + * Acknowledge the reception of a single message. + * + * This method will block until an acknowledgement is sent to the broker. After + * that, the message will not be re-delivered to this consumer. + * + * @see asyncAcknowledge + * @param message the message to acknowledge + * @return ResultOk if the message was successfully acknowledged + * @return ResultError if there was a failure + */ +PULSAR_PUBLIC pulsar_result pulsar_consumer_acknowledge(pulsar_consumer_t *consumer, + pulsar_message_t *message); + +PULSAR_PUBLIC pulsar_result pulsar_consumer_acknowledge_id(pulsar_consumer_t *consumer, + pulsar_message_id_t *messageId); + +/** + * Asynchronously acknowledge the reception of a single message. + * + * This method will initiate the operation and return immediately. The provided callback + * will be triggered when the operation is complete. + * + * @param message the message to acknowledge + * @param callback callback that will be triggered when the message has been acknowledged + */ +PULSAR_PUBLIC void pulsar_consumer_acknowledge_async(pulsar_consumer_t *consumer, pulsar_message_t *message, + pulsar_result_callback callback, void *ctx); + +PULSAR_PUBLIC void pulsar_consumer_acknowledge_async_id(pulsar_consumer_t *consumer, + pulsar_message_id_t *messageId, + pulsar_result_callback callback, void *ctx); + +/** + * Acknowledge the reception of all the messages in the stream up to (and including) + * the provided message. + * + * This method will block until an acknowledgement is sent to the broker. After + * that, the messages will not be re-delivered to this consumer. + * + * Cumulative acknowledge cannot be used when the consumer type is set to ConsumerShared. + * + * It's equivalent to calling asyncAcknowledgeCumulative(const Message&, ResultCallback) and + * waiting for the callback to be triggered. + * + * @param message the last message in the stream to acknowledge + * @return ResultOk if the message was successfully acknowledged. All previously delivered messages for + * this topic are also acknowledged. + * @return ResultError if there was a failure + */ +PULSAR_PUBLIC pulsar_result pulsar_consumer_acknowledge_cumulative(pulsar_consumer_t *consumer, + pulsar_message_t *message); + +PULSAR_PUBLIC pulsar_result pulsar_consumer_acknowledge_cumulative_id(pulsar_consumer_t *consumer, + pulsar_message_id_t *messageId); + +/** + * Asynchronously acknowledge the reception of all the messages in the stream up to (and + * including) the provided message. + * + * This method will initiate the operation and return immediately. The provided callback + * will be triggered when the operation is complete. + * + * @param message the message to acknowledge + * @param callback callback that will be triggered when the message has been acknowledged + */ +PULSAR_PUBLIC void pulsar_consumer_acknowledge_cumulative_async(pulsar_consumer_t *consumer, + pulsar_message_t *message, + pulsar_result_callback callback, void *ctx); + +PULSAR_PUBLIC void pulsar_consumer_acknowledge_cumulative_async_id(pulsar_consumer_t *consumer, + pulsar_message_id_t *messageId, + pulsar_result_callback callback, + void *ctx); + +/** + * Acknowledge the failure to process a single message. + * <p> + * When a message is "negatively acked" it will be marked for redelivery after + * some fixed delay. The delay is configurable when constructing the consumer + * with {@link ConsumerConfiguration#setNegativeAckRedeliveryDelayMs}. + * <p> + * This call is not blocking. + * + * @param message + * The {@code Message} to be acknowledged + */ +PULSAR_PUBLIC void pulsar_consumer_negative_acknowledge(pulsar_consumer_t *consumer, + pulsar_message_t *message); + +/** + * Acknowledge the failure to process a single message through its message id + * <p> + * When a message is "negatively acked" it will be marked for redelivery after + * some fixed delay. The delay is configurable when constructing the consumer + * with {@link ConsumerConfiguration#setNegativeAckRedeliveryDelayMs}. + * <p> + * This call is not blocking. + * + * @param message + * The message id to be acknowledged + */ +PULSAR_PUBLIC void pulsar_consumer_negative_acknowledge_id(pulsar_consumer_t *consumer, + pulsar_message_id_t *messageId); + +PULSAR_PUBLIC pulsar_result pulsar_consumer_close(pulsar_consumer_t *consumer); + +PULSAR_PUBLIC void pulsar_consumer_close_async(pulsar_consumer_t *consumer, pulsar_result_callback callback, + void *ctx); + +PULSAR_PUBLIC void pulsar_consumer_free(pulsar_consumer_t *consumer); + +/* + * Pause receiving messages via the messageListener, till resumeMessageListener() is called. + */ +PULSAR_PUBLIC pulsar_result pulsar_consumer_pause_message_listener(pulsar_consumer_t *consumer); + +/* + * Resume receiving the messages via the messageListener. + * Asynchronously receive all the messages enqueued from time pauseMessageListener() was called. + */ +PULSAR_PUBLIC pulsar_result resume_message_listener(pulsar_consumer_t *consumer); + +/** + * Redelivers all the unacknowledged messages. In Failover mode, the request is ignored if the consumer is + * not + * active for the given topic. In Shared mode, the consumers messages to be redelivered are distributed + * across all + * the connected consumers. This is a non blocking call and doesn't throw an exception. In case the + * connection + * breaks, the messages are redelivered after reconnect. + */ +PULSAR_PUBLIC void pulsar_consumer_redeliver_unacknowledged_messages(pulsar_consumer_t *consumer); + +/** + * Reset the subscription associated with this consumer to a specific message id. + * + * @param consumer The consumer + * @param messageId The message id can either be a specific message or represent the first or last messages in + * the topic. + * @param callback The callback for this async operation + * @param ctx The context for the callback + */ +PULSAR_PUBLIC void pulsar_consumer_seek_async(pulsar_consumer_t *consumer, pulsar_message_id_t *messageId, + pulsar_result_callback callback, void *ctx); + +/** + * Reset the subscription asynchronously associated with this consumer to a specific message id. + * + * @param consumer The consumer + * @param messageId The message id can either be a specific message or represent the first or last messages in + * the topic. + * @return Operation result + */ +PULSAR_PUBLIC pulsar_result pulsar_consumer_seek(pulsar_consumer_t *consumer, pulsar_message_id_t *messageId); + +/** + * Reset the subscription associated with this consumer to a specific message publish time. + * + * @param consumer The consumer + * @param timestamp The message publish time where to reposition the subscription. The timestamp format should + * be Unix time in milliseconds. + * @param callback The callback for this async operation + * @param ctx The context for the callback + */ +PULSAR_PUBLIC void pulsar_consumer_seek_by_timestamp_async(pulsar_consumer_t *consumer, uint64_t timestamp, + pulsar_result_callback callback, void *ctx); + +/** + * Reset the subscription asynchronously associated with this consumer to a specific message publish time. + * + * @param consumer The consumer + * @param timestamp The message publish time where to reposition the subscription. The timestamp format should + * be Unix time in milliseconds. + * @return Operation result + */ +PULSAR_PUBLIC pulsar_result pulsar_consumer_seek_by_timestamp(pulsar_consumer_t *consumer, + uint64_t timestamp); + +PULSAR_PUBLIC int pulsar_consumer_is_connected(pulsar_consumer_t *consumer); + +PULSAR_PUBLIC pulsar_result pulsar_consumer_get_last_message_id(pulsar_consumer_t *consumer, + pulsar_message_id_t *messageId); + +#ifdef __cplusplus +} +#endif Added: dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.1.0-candidate-1/x86-windows-static/include/pulsar/c/consumer.h.asc ============================================================================== --- dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.1.0-candidate-1/x86-windows-static/include/pulsar/c/consumer.h.asc (added) +++ dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.1.0-candidate-1/x86-windows-static/include/pulsar/c/consumer.h.asc Wed Nov 23 09:18:55 2022 @@ -0,0 +1,16 @@ +-----BEGIN PGP SIGNATURE----- + +iQIzBAABCgAdFiEE6ItqSN52cCOQDJEjT0AbyNP5+1UFAmN9xZAACgkQT0AbyNP5 ++1WcPQ/+LnLx6Ls32RQeGsSFgwLnA/OyT7vUqbMlGNSujvrMhSgVJD1+UmDqQKdT +kON9S2AtI1H6//DbtRuUMNnyw5r49fsSsLueBe3oZODjNxJwmK0nyXgVy8B38peO +6KgmI4dYUm37pck98CF2XNR4dFzY0gtGvNPIXUPRs7ln8uenWhp1key2cnAzszp9 +ceoDO1tEonS4LqKNsFtfUIyQZ0u+TGM3e7VRleVqN8U2R0pJnHZCKU/x15cWwIk+ +iwBTWQHqB8rltBefMMDFFAEkfoElAANrF5DysDxz6nHmrjGgqfvu5irr+YWz0Ss1 +F3jyN0QdoRTy99us8j8fgi9rwq/HFsDNi3rdLTrF25CvArpGUd+VcB+DTvUG3ZIY +qTF4qDRY+tK6wfufXnbfazWk1FJW2VLGfXLM1xYjFMm4JDlSRvjNW86p7kuU0fez +gUFN5SBAzeSblHfVK02dl7ITpi4JkP+L1r4KQBfRurOwdHBaSKXNIcU1rTr7XwL3 +l1WJRRMidOG2YQfglhMjTsOHhZALr2vEIq43TBWtbcAjt/tz44nmPiMTV2hq+Pyp +CAKvi1BshbX6i1ea6JiF/ZU72tberW6Ddg4PDmwkf1ORC/+Xy3cQW8dqZl19dkFN +LkWPpZpq3y/8UeS+XwKQyQvmAXv9E8UM1PcGVETKSGAla1CKA+I= +=ebpo +-----END PGP SIGNATURE----- Added: dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.1.0-candidate-1/x86-windows-static/include/pulsar/c/consumer.h.sha512 ============================================================================== --- dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.1.0-candidate-1/x86-windows-static/include/pulsar/c/consumer.h.sha512 (added) +++ dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.1.0-candidate-1/x86-windows-static/include/pulsar/c/consumer.h.sha512 Wed Nov 23 09:18:55 2022 @@ -0,0 +1 @@ +91a3193272e451c6368d2dd4776d9e7aad318d33d5ef99d80cbf412d3173ba22f1ba04646870d0a78d6cd5171b90226b72537ca0190707b37e18b4b06e6ea947 ./x86-windows-static/include/pulsar/c/consumer.h
