From 55f954185ea5abe73292e39939a56ad8302860fa Mon Sep 17 00:00:00 2001 From: SravanThotakura05 <83568543+SravanThotakura05@users.noreply.github.com> Date: Mon, 18 Dec 2023 14:51:07 +0530 Subject: [PATCH] Updated documentation & read-me --- README.md | 22 +- .../quarkus-solace-extension-incoming.adoc | 293 ++++++++++++++++++ .../quarkus-solace-extension-outgoing.adoc | 133 ++++++++ docs/modules/ROOT/pages/index.adoc | 13 +- .../quarkiverse/solace/SolaceConnector.java | 22 +- 5 files changed, 458 insertions(+), 25 deletions(-) create mode 100644 docs/modules/ROOT/pages/includes/quarkus-solace-extension-incoming.adoc create mode 100644 docs/modules/ROOT/pages/includes/quarkus-solace-extension-outgoing.adoc diff --git a/README.md b/README.md index 3b82a67..ecdc46e 100644 --- a/README.md +++ b/README.md @@ -2,24 +2,20 @@ [![Version](https://img.shields.io/maven-central/v/io.quarkiverse.solace/quarkus-solace?logo=apache-maven&style=flat-square)](https://search.maven.org/artifact/io.quarkiverse.solace/quarkus-solace) -## Welcome to Quarkiverse! +## About Solace Quarkus Extension -Congratulations and thank you for creating a new Quarkus extension project in Quarkiverse! +Solace Quarkus Extension for integrating with Solace PubSub+ message brokers. The extension provides the ability to publish or consume events from event mesh. -Feel free to replace this content with the proper description of your new project and necessary instructions how to use and contribute to it. - -You can find the basic info, Quarkiverse policies and conventions in [the Quarkiverse wiki](https://github.com/quarkiverse/quarkiverse/wiki). - -In case you are creating a Quarkus extension project for the first time, please follow [Building My First Extension](https://quarkus.io/guides/building-my-first-extension) guide. - -Other useful articles related to Quarkus extension development can be found under the [Writing Extensions](https://quarkus.io/guides/#writing-extensions) guide category on the [Quarkus.io](https://quarkus.io) website. - -Thanks again, good luck and have fun! +Samples folder has examples on how to use the connector - [solace-connector-sample](https://github.com/SolaceCoEExt/solace-quarkus/tree/main/samples/hello-connector-solace/src/main/java/io/quarkiverse/solace/samples) ## Documentation The documentation for this extension should be maintained as part of this repository and it is stored in the `docs/` directory. -The layout should follow the [Antora's Standard File and Directory Set](https://docs.antora.org/antora/2.3/standard-directories/). +## Running the extension + +```quarkus build``` to build the extension. Please note that docker should be up & running to run the tests during build process + +```quarkus build --no-tests``` to build the extension without running tests -Once the docs are ready to be published, please open a PR including this repository in the [Quarkiverse Docs Antora playbook](https://github.com/quarkiverse/quarkiverse-docs/blob/main/antora-playbook.yml#L7). See an example [here](https://github.com/quarkiverse/quarkiverse-docs/pull/1). +```quarkus dev``` run this command in the samples project folder to start the connector. diff --git a/docs/modules/ROOT/pages/includes/quarkus-solace-extension-incoming.adoc b/docs/modules/ROOT/pages/includes/quarkus-solace-extension-incoming.adoc new file mode 100644 index 0000000..4b786fd --- /dev/null +++ b/docs/modules/ROOT/pages/includes/quarkus-solace-extension-incoming.adoc @@ -0,0 +1,293 @@ + +:summaryTableId: quarkus-solace-extension-incoming +Incoming configuration for Solace Quarkus Extension +[.configuration-reference.searchable, cols="80,.^10,.^10"] +|=== + +h|[[quarkus-solace_configuration_incoming]]link:#quarkus-solace_configuration_incoming[Configuration property] + +h|Type +h|Default + +a| [[quarkus-solace_quarkus.consumer.queue.name]]`link:#quarkus-solace_quarkus.consumer.queue.name[consumer.queue.name]` + + +[.description] +-- +The queue name of receiver. + +// ifdef::add-copy-button-to-env-var[] +// Environment variable: env_var_with_copy_button:+++QUARKUS_SOLACE_METRICS_ENABLED+++[] +// endif::add-copy-button-to-env-var[] +// ifndef::add-copy-button-to-env-var[] +// Environment variable: `+++QUARKUS_SOLACE_METRICS_ENABLED+++` +// endif::add-copy-button-to-env-var[] +--|string +| + + +a| [[quarkus-solace_quarkus.consumer.queue.type]]`link:#quarkus-solace_quarkus.consumer.queue.type[consumer.queue.type]` + + +[.description] +-- +The queue type of receiver. + +// ifdef::add-copy-button-to-env-var[] +// Environment variable: env_var_with_copy_button:+++QUARKUS_SOLACE_HEALTH_ENABLED+++[] +// endif::add-copy-button-to-env-var[] +// ifndef::add-copy-button-to-env-var[] +// Environment variable: `+++QUARKUS_SOLACE_HEALTH_ENABLED+++` +// endif::add-copy-button-to-env-var[] +--|string +|`durable-non-exclusive` + + +a| [[quarkus-solace_quarkus.consumer.queue.missing-resource-creation-strategy]]`link:#quarkus-solace_quarkus.consumer.queue.missing-resource-creation-strategy[consumer.queue.missing-resource-creation-strategy]` + + +[.description] +-- +Create resources on broker if not available. When set to `create-on-start` the extension provision the queue on broker and also sets the queue type and any subscriptions if configured. + +// ifdef::add-copy-button-to-env-var[] +// Environment variable: env_var_with_copy_button:+++QUARKUS_SOLACE_DEVSERVICES_ENABLED+++[] +// endif::add-copy-button-to-env-var[] +// ifndef::add-copy-button-to-env-var[] +// Environment variable: `+++QUARKUS_SOLACE_DEVSERVICES_ENABLED+++` +// endif::add-copy-button-to-env-var[] +--|string +|`do-not-create` + + +a| [[quarkus-solace_quarkus.consumer.queue.add-additional-subscriptions]]`link:#quarkus-solace_quarkus.consumer.queue.add-additional-subscriptions[consumer.queue.add-additional-subscriptions]` + + +[.description] +-- +Whether to add configured subscriptions to queue. Will fail if permissions to configure subscriptions is not allowed on broker. + +// ifdef::add-copy-button-to-env-var[] +// Environment variable: env_var_with_copy_button:+++QUARKUS_SOLACE_DEVSERVICES_IMAGE_NAME+++[] +// endif::add-copy-button-to-env-var[] +// ifndef::add-copy-button-to-env-var[] +// Environment variable: `+++QUARKUS_SOLACE_DEVSERVICES_IMAGE_NAME+++` +// endif::add-copy-button-to-env-var[] +--|boolean +|`false` + + +a| [[quarkus-solace_quarkus.consumer.queue.subscriptions]]`link:#quarkus-solace_quarkus.consumer.queue.subscriptions[consumer.queue.subscriptions]` + + +[.description] +-- +The comma separated list of subscriptions, the channel name if empty. This configuration is considered if `consumer.queue.add-additional-subscriptions` is set to true. + +// ifdef::add-copy-button-to-env-var[] +// Environment variable: env_var_with_copy_button:+++QUARKUS_SOLACE_DEVSERVICES_SHARED+++[] +// endif::add-copy-button-to-env-var[] +// ifndef::add-copy-button-to-env-var[] +// Environment variable: `+++QUARKUS_SOLACE_DEVSERVICES_SHARED+++` +// endif::add-copy-button-to-env-var[] +--|string +| + + +a| [[quarkus-solace_quarkus.consumer.queue.selector-query]]`link:#quarkus-solace_quarkus.consumer.queue.selector-query[quarkus.consumer.queue.selector-query]` + + +[.description] +-- +The receiver selector query. If configured, broker will filter messages using this condition. + +// ifdef::add-copy-button-to-env-var[] +// Environment variable: env_var_with_copy_button:+++QUARKUS_SOLACE_DEVSERVICES_SERVICE_NAME+++[] +// endif::add-copy-button-to-env-var[] +// ifndef::add-copy-button-to-env-var[] +// Environment variable: `+++QUARKUS_SOLACE_DEVSERVICES_SERVICE_NAME+++` +// endif::add-copy-button-to-env-var[] +--|string +| + + +a| [[quarkus-solace_quarkus.consumer.queue.replay.strategy]]`link:#quarkus-solace_quarkus.consumer.queue.replay.strategy[consumer.queue.replay.strategy]` + + +[.description] +-- +The receiver replay strategy. Supported values `all-messages`, `time-based`, `replication-group-message-id`. + +// ifdef::add-copy-button-to-env-var[] +// Environment variable: env_var_with_copy_button:+++QUARKUS_SOLACE_HOST+++[] +// endif::add-copy-button-to-env-var[] +// ifndef::add-copy-button-to-env-var[] +// Environment variable: `+++QUARKUS_SOLACE_HOST+++` +// endif::add-copy-button-to-env-var[] +--|string +| + + +a| [[quarkus-solace_quarkus.consumer.queue.replay.timebased-start-time]]`link:#quarkus-solace_quarkus.consumer.queue.replay.timebased-start-time[consumer.queue.replay.timebased-start-time]` + + +[.description] +-- +The receiver replay timebased start time. Set this value if `consumer.queue.replay.strategy` is `time-based`. + +// ifdef::add-copy-button-to-env-var[] +// Environment variable: env_var_with_copy_button:+++QUARKUS_SOLACE_VPN+++[] +// endif::add-copy-button-to-env-var[] +// ifndef::add-copy-button-to-env-var[] +// Environment variable: `+++QUARKUS_SOLACE_VPN+++` +// endif::add-copy-button-to-env-var[] +--|string +| + + +a| [[quarkus-solace_quarkus.consumer.queue.replay.replication-group-message-id]]`link:#quarkus-solace_quarkus.consumer.queue.replay.replication-group-message-id[quarkus.consumer.queue.replay.replication-group-message-id]` + + +[.description] +-- +The receiver replay replication group message id. + +// ifdef::add-copy-button-to-env-var[] +// Environment variable: env_var_with_copy_button:+++QUARKUS_SOLACE_DEVSERVICES_CONTAINER_ENV+++[] +// endif::add-copy-button-to-env-var[] +// ifndef::add-copy-button-to-env-var[] +// Environment variable: `+++QUARKUS_SOLACE_DEVSERVICES_CONTAINER_ENV+++` +// endif::add-copy-button-to-env-var[] +--|`string` +| + + +a| [[quarkus-solace_quarkus.consumer.queue.polled-wait-time-in-millis]]`link:#quarkus-solace_quarkus.consumer.queue.polled-wait-time-in-millis[consumer.queue.polled-wait-time-in-millis]` + + +[.description] +-- +Maximum wait time in milliseconds for consumers to receive a message from configured queue. + +// ifdef::add-copy-button-to-env-var[] +// Environment variable: env_var_with_copy_button:+++QUARKUS_SOLACE+++[] +// endif::add-copy-button-to-env-var[] +// ifndef::add-copy-button-to-env-var[] +// Environment variable: `+++QUARKUS_SOLACE+++` +// endif::add-copy-button-to-env-var[] +--|`integer` +| 100 + +a| [[quarkus-solace_quarkus.consumer.queue.discard-messages-on-failure]]`link:#quarkus-solace_quarkus.consumer.queue.discard-messages-on-failure[consumer.queue.discard-messages-on-failure]` + + +[.description] +-- +Whether discard messages from queue on failure. A negative acknowledgment of type REJECTED is sent to broker which discards the messages from queue and will move to DMQ if enabled. This option works only when enable-nacks is true and error topic is not configured. + +// ifdef::add-copy-button-to-env-var[] +// Environment variable: env_var_with_copy_button:+++QUARKUS_SOLACE+++[] +// endif::add-copy-button-to-env-var[] +// ifndef::add-copy-button-to-env-var[] +// Environment variable: `+++QUARKUS_SOLACE+++` +// endif::add-copy-button-to-env-var[] +--|`boolean` +| false + +a| [[quarkus-solace_quarkus.consumer.queue.publish-to-error-topic-on-failure]]`link:#quarkus-solace_quarkus.consumer.queue.publish-to-error-topic-on-failure[consumer.queue.publish-to-error-topic-on-failure]` + + +[.description] +-- +Whether to publish consumed message to error topic on failure. + +// ifdef::add-copy-button-to-env-var[] +// Environment variable: env_var_with_copy_button:+++QUARKUS_SOLACE+++[] +// endif::add-copy-button-to-env-var[] +// ifndef::add-copy-button-to-env-var[] +// Environment variable: `+++QUARKUS_SOLACE+++` +// endif::add-copy-button-to-env-var[] +--|`boolean` +| false + +a| [[quarkus-solace_quarkus.consumer.queue.error.topic]]`link:#quarkus-solace_quarkus.consumer.queue.error.topic[consumer.queue.error.topic]` + + +[.description] +-- +The error topic where message should be published in case of error. + +// ifdef::add-copy-button-to-env-var[] +// Environment variable: env_var_with_copy_button:+++QUARKUS_SOLACE+++[] +// endif::add-copy-button-to-env-var[] +// ifndef::add-copy-button-to-env-var[] +// Environment variable: `+++QUARKUS_SOLACE+++` +// endif::add-copy-button-to-env-var[] +--|`string` +| + +a| [[quarkus-solace_quarkus.consumer.queue.error.message.dmq-eligible]]`link:#quarkus-solace_quarkus.consumer.queue.error.message.dmq-eligible[consumer.queue.error.message.dmq-eligible]` + + +[.description] +-- +Whether error message is eligible to move to dead message queue. + +// ifdef::add-copy-button-to-env-var[] +// Environment variable: env_var_with_copy_button:+++QUARKUS_SOLACE+++[] +// endif::add-copy-button-to-env-var[] +// ifndef::add-copy-button-to-env-var[] +// Environment variable: `+++QUARKUS_SOLACE+++` +// endif::add-copy-button-to-env-var[] +--|`boolean` +| `false` + +a| [[quarkus-solace_quarkus.consumer.queue.error.message.ttl]]`link:#quarkus-solace_quarkus.consumer.queue.error.message.ttl[consumer.queue.error.message.ttl]` + + +[.description] +-- +TTL for Error message before moving to dead message queue. + +// ifdef::add-copy-button-to-env-var[] +// Environment variable: env_var_with_copy_button:+++QUARKUS_SOLACE+++[] +// endif::add-copy-button-to-env-var[] +// ifndef::add-copy-button-to-env-var[] +// Environment variable: `+++QUARKUS_SOLACE+++` +// endif::add-copy-button-to-env-var[] +--|`long` +| `null` + +a| [[quarkus-solace_quarkus.consumer.queue.error.message.max-delivery-attempts]]`link:#quarkus-solace_quarkus.consumer.queue.error.message.max-delivery-attempts[consumer.queue.error.message.max-delivery-attempts]` + + +[.description] +-- +Maximum number of attempts to send a failed message to the error topic in case of failure. Each attempt will have a backoff interval of 1 second. When all delivery attempts have been exhausted, the failed message will be requeued on the queue for redelivery. + +// ifdef::add-copy-button-to-env-var[] +// Environment variable: env_var_with_copy_button:+++QUARKUS_SOLACE+++[] +// endif::add-copy-button-to-env-var[] +// ifndef::add-copy-button-to-env-var[] +// Environment variable: `+++QUARKUS_SOLACE+++` +// endif::add-copy-button-to-env-var[] +--|`int` +| `3` + +a| [[quarkus-solace_quarkus.consumer.queue.enable-nacks]]`link:#quarkus-solace_quarkus.consumer.queue.enable-nacks[consumer.queue.enable-nacks]` + + +[.description] +-- +Whether to enable negative acknowledgments on failed messages. Nacks are supported on event brokers 10.2.1 and later. If an event broker does not support Nacks, an exception is thrown. + +// ifdef::add-copy-button-to-env-var[] +// Environment variable: env_var_with_copy_button:+++QUARKUS_SOLACE+++[] +// endif::add-copy-button-to-env-var[] +// ifndef::add-copy-button-to-env-var[] +// Environment variable: `+++QUARKUS_SOLACE+++` +// endif::add-copy-button-to-env-var[] +--|`boolean` +| `false` + +|=== \ No newline at end of file diff --git a/docs/modules/ROOT/pages/includes/quarkus-solace-extension-outgoing.adoc b/docs/modules/ROOT/pages/includes/quarkus-solace-extension-outgoing.adoc new file mode 100644 index 0000000..415c199 --- /dev/null +++ b/docs/modules/ROOT/pages/includes/quarkus-solace-extension-outgoing.adoc @@ -0,0 +1,133 @@ + +:summaryTableId: quarkus-solace-extension-outgoing +Outgoing configuration for Solace Quarkus Extension +[.configuration-reference.searchable, cols="80,.^10,.^10"] +|=== + +h|[[quarkus-solace_configuration_outgoing]]link:#quarkus-solace_configuration_outgoing[Configuration property] + +h|Type +h|Default + +a| [[quarkus-solace_quarkus.producer.topic]]`link:#quarkus-solace_quarkus.producer.topic[producer.topic]` + + +[.description] +-- +The topic to publish messages, by default the channel name. + +// ifdef::add-copy-button-to-env-var[] +// Environment variable: env_var_with_copy_button:+++QUARKUS_SOLACE_METRICS_ENABLED+++[] +// endif::add-copy-button-to-env-var[] +// ifndef::add-copy-button-to-env-var[] +// Environment variable: `+++QUARKUS_SOLACE_METRICS_ENABLED+++` +// endif::add-copy-button-to-env-var[] +--|string +| + + +a| [[quarkus-solace_quarkus.producer.max-inflight-messages]]`link:#quarkus-solace_quarkus.producer.max-inflight-messages[producer.max-inflight-messages]` + + +[.description] +-- +The maximum number of messages to be written to Solace broker. It limits the number of messages waiting to be written and acknowledged by the broker. You can set this attribute to `0` remove the limit. + +// ifdef::add-copy-button-to-env-var[] +// Environment variable: env_var_with_copy_button:+++QUARKUS_SOLACE_HEALTH_ENABLED+++[] +// endif::add-copy-button-to-env-var[] +// ifndef::add-copy-button-to-env-var[] +// Environment variable: `+++QUARKUS_SOLACE_HEALTH_ENABLED+++` +// endif::add-copy-button-to-env-var[] +--|long +|`1024` + + +a| [[quarkus-solace_quarkus.producer.waitForPublishReceipt]]`link:#quarkus-solace_quarkus.producer.waitForPublishReceipt[producer.waitForPublishReceipt]` + + +[.description] +-- +Whether the client waits to receive the publish receipt from Solace broker before acknowledging the message. + +// ifdef::add-copy-button-to-env-var[] +// Environment variable: env_var_with_copy_button:+++QUARKUS_SOLACE_DEVSERVICES_ENABLED+++[] +// endif::add-copy-button-to-env-var[] +// ifndef::add-copy-button-to-env-var[] +// Environment variable: `+++QUARKUS_SOLACE_DEVSERVICES_ENABLED+++` +// endif::add-copy-button-to-env-var[] +--|boolean +|`true` + + +a| [[quarkus-solace_quarkus.producer.delivery.ack.timeout]]`link:#quarkus-solace_quarkus.producer.delivery.ack.timeout[producer.delivery.ack.timeout]` + + +[.description] +-- +Timeout to receive the publish receipt from broker. + +// ifdef::add-copy-button-to-env-var[] +// Environment variable: env_var_with_copy_button:+++QUARKUS_SOLACE_DEVSERVICES_IMAGE_NAME+++[] +// endif::add-copy-button-to-env-var[] +// ifndef::add-copy-button-to-env-var[] +// Environment variable: `+++QUARKUS_SOLACE_DEVSERVICES_IMAGE_NAME+++` +// endif::add-copy-button-to-env-var[] +--|integer +| + + +a| [[quarkus-solace_quarkus.producer.delivery.ack.window.size]]`link:#quarkus-solace_quarkus.producer.delivery.ack.window.size[producer.delivery.ack.window.size]` + + +[.description] +-- +Publish Window will determine the maximum number of messages the application can send before the Solace API must receive an acknowledgment from the Solace. + +// ifdef::add-copy-button-to-env-var[] +// Environment variable: env_var_with_copy_button:+++QUARKUS_SOLACE_DEVSERVICES_SHARED+++[] +// endif::add-copy-button-to-env-var[] +// ifndef::add-copy-button-to-env-var[] +// Environment variable: `+++QUARKUS_SOLACE_DEVSERVICES_SHARED+++` +// endif::add-copy-button-to-env-var[] +--|integer +| + + +a| [[quarkus-solace_quarkus.producer.back-pressure.strategy]]`link:#quarkus-solace_quarkus.producer.back-pressure.strategy[producer.back-pressure.strategy]` + + +[.description] +-- +It is possible for the client application to publish messages more quickly than the API can send them to the broker due to network congestion or connectivity issues. This delay can cause the internal buffer to accumulate messages until it reaches its capacity, preventing the API from storing any more messages. + +Supported strategies `reject`, `elastic`, `wait`. Refer to `https://docs.solace.com/API/API-Developer-Guide-Java/Java-PM-Publish.htm#Configuring-Back-Pressure[link]`. + + +// ifdef::add-copy-button-to-env-var[] +// Environment variable: env_var_with_copy_button:+++QUARKUS_SOLACE_DEVSERVICES_SERVICE_NAME+++[] +// endif::add-copy-button-to-env-var[] +// ifndef::add-copy-button-to-env-var[] +// Environment variable: `+++QUARKUS_SOLACE_DEVSERVICES_SERVICE_NAME+++` +// endif::add-copy-button-to-env-var[] +--|string +|`reject` + + +a| [[quarkus-solace_quarkus.producer.back-pressure.buffer-capacity]]`link:#quarkus-solace_quarkus.producer.back-pressure.buffer-capacity[producer.back-pressure.buffer-capacity]` + + +[.description] +-- +Outgoing messages backpressure buffer capacity. + +// ifdef::add-copy-button-to-env-var[] +// Environment variable: env_var_with_copy_button:+++QUARKUS_SOLACE_HOST+++[] +// endif::add-copy-button-to-env-var[] +// ifndef::add-copy-button-to-env-var[] +// Environment variable: `+++QUARKUS_SOLACE_HOST+++` +// endif::add-copy-button-to-env-var[] +--|integer +|`1024` + +|=== \ No newline at end of file diff --git a/docs/modules/ROOT/pages/index.adoc b/docs/modules/ROOT/pages/index.adoc index 990a874..cb7966d 100644 --- a/docs/modules/ROOT/pages/index.adoc +++ b/docs/modules/ROOT/pages/index.adoc @@ -2,7 +2,8 @@ include::./includes/attributes.adoc[] -TIP: Describe what the extension does here. +TIP: Solace Quarkus Extension for integrating with Solace PubSub+ message brokers. The extension provides the ability to publish or consume events from event mesh. + == Installation @@ -25,3 +26,13 @@ For instance, with Maven, add the following dependency to your POM file: TIP: Remove this section if you don't have Quarkus configuration properties in your extension. include::includes/quarkus-solace.adoc[leveloffset=+1, opts=optional] + +[[extension-incoming-configuration-reference]] +== Incoming Configuration Reference + +include::includes/quarkus-solace-extension-incoming.adoc[leveloffset=+1, opts=optional] + +[[extension-outgoing-configuration-reference]] +== Outgoing Configuration Reference + +include::includes/quarkus-solace-extension-outgoing.adoc[leveloffset=+1, opts=optional] \ No newline at end of file diff --git a/pubsub-plus-connector/src/main/java/io/quarkiverse/solace/SolaceConnector.java b/pubsub-plus-connector/src/main/java/io/quarkiverse/solace/SolaceConnector.java index e25b7b5..a3daccd 100644 --- a/pubsub-plus-connector/src/main/java/io/quarkiverse/solace/SolaceConnector.java +++ b/pubsub-plus-connector/src/main/java/io/quarkiverse/solace/SolaceConnector.java @@ -41,32 +41,32 @@ //@ConnectorAttribute(name = "client.type", type = "string", direction = INCOMING_AND_OUTGOING, description = "Direct or persisted", defaultValue = "persisted") @ConnectorAttribute(name = "client.lazy.start", type = "boolean", direction = INCOMING_AND_OUTGOING, description = "Whether the receiver or publisher is started at initialization or lazily at subscription time", defaultValue = "false") @ConnectorAttribute(name = "client.shutdown.wait-timeout", type = "long", direction = INCOMING_AND_OUTGOING, description = "Timeout in milliseconds to wait for messages to finish processing before shutdown", defaultValue = "10000") -@ConnectorAttribute(name = "consumer.queue.enable-nacks", type = "boolean", direction = INCOMING, description = "Whether to enable negative acknowledgments on failed messages. Nacks are supported on event brokers 10.2.1 and later. If an event broker does not support Nacks, an exception is thrown", defaultValue = "false") -@ConnectorAttribute(name = "consumer.queue.add-additional-subscriptions", type = "boolean", direction = INCOMING, description = "Whether to add configured subscriptions to queue. Will fail if permissions to configure subscriptions is not allowed on broker", defaultValue = "false") -@ConnectorAttribute(name = "consumer.queue.subscriptions", type = "string", direction = INCOMING, description = "The comma separated list of subscriptions, the channel name if empty") -@ConnectorAttribute(name = "consumer.queue.type", type = "string", direction = INCOMING, description = "The queue type of receiver", defaultValue = "durable-non-exclusive") @ConnectorAttribute(name = "consumer.queue.name", type = "string", direction = INCOMING, description = "The queue name of receiver") -// TODO implement consumer concurrency -//@ConnectorAttribute(name = "consumer.queue.concurrency", type = "int", direction = INCOMING, description = "The number of concurrent consumers", defaultValue = "1") -@ConnectorAttribute(name = "consumer.queue.polled-wait-time-in-millis", type = "int", direction = INCOMING, description = "Maximum wait time for polled consumers to receive a message from configured queue", defaultValue = "100") +@ConnectorAttribute(name = "consumer.queue.type", type = "string", direction = INCOMING, description = "The queue type of receiver", defaultValue = "durable-non-exclusive") @ConnectorAttribute(name = "consumer.queue.missing-resource-creation-strategy", type = "string", direction = INCOMING, description = "Missing resource creation strategy", defaultValue = "do-not-create") +@ConnectorAttribute(name = "consumer.queue.add-additional-subscriptions", type = "boolean", direction = INCOMING, description = "Whether to add configured subscriptions to queue. Will fail if permissions to configure subscriptions is not allowed on broker", defaultValue = "false") +@ConnectorAttribute(name = "consumer.queue.subscriptions", type = "string", direction = INCOMING, description = "The comma separated list of subscriptions, the channel name if empty") @ConnectorAttribute(name = "consumer.queue.selector-query", type = "string", direction = INCOMING, description = "The receiver selector query") @ConnectorAttribute(name = "consumer.queue.replay.strategy", type = "string", direction = INCOMING, description = "The receiver replay strategy") @ConnectorAttribute(name = "consumer.queue.replay.timebased-start-time", type = "string", direction = INCOMING, description = "The receiver replay timebased start time") @ConnectorAttribute(name = "consumer.queue.replay.replication-group-message-id", type = "string", direction = INCOMING, description = "The receiver replay replication group message id") +@ConnectorAttribute(name = "consumer.queue.polled-wait-time-in-millis", type = "int", direction = INCOMING, description = "Maximum wait time in milliseconds for consumers to receive a message from configured queue", defaultValue = "100") +// TODO implement consumer concurrency +//@ConnectorAttribute(name = "consumer.queue.concurrency", type = "int", direction = INCOMING, description = "The number of concurrent consumers", defaultValue = "1") @ConnectorAttribute(name = "consumer.queue.discard-messages-on-failure", type = "boolean", direction = INCOMING, description = "Whether discard messages from queue on failure. A negative acknowledgment of type REJECTED is sent to broker which discards the messages from queue and will move to DMQ if enabled. This option works only when enable-nacks is true and error topic is not configured", defaultValue = "false") @ConnectorAttribute(name = "consumer.queue.publish-to-error-topic-on-failure", type = "boolean", direction = INCOMING, description = "Whether to publish consumed message to error topic on failure", defaultValue = "false") @ConnectorAttribute(name = "consumer.queue.error.topic", type = "string", direction = INCOMING, description = "The error topic where message should be published in case of error") @ConnectorAttribute(name = "consumer.queue.error.message.dmq-eligible", type = "boolean", direction = INCOMING, description = "Whether error message is eligible to move to dead message queue", defaultValue = "false") -@ConnectorAttribute(name = "consumer.queue.error.message.ttl", type = "long", direction = INCOMING, description = "Error message TTL before moving to dead message queue") +@ConnectorAttribute(name = "consumer.queue.error.message.ttl", type = "long", direction = INCOMING, description = "TTL for Error message before moving to dead message queue.") @ConnectorAttribute(name = "consumer.queue.error.message.max-delivery-attempts", type = "int", direction = INCOMING, description = "Maximum number of attempts to send a failed message to the error topic in case of failure. Each attempt will have a backoff interval of 1 second. When all delivery attempts have been exhausted, the failed message will be requeued on the queue for redelivery.", defaultValue = "3") +@ConnectorAttribute(name = "consumer.queue.enable-nacks", type = "boolean", direction = INCOMING, description = "Whether to enable negative acknowledgments on failed messages. Nacks are supported on event brokers 10.2.1 and later. If an event broker does not support Nacks, an exception is thrown", defaultValue = "false") @ConnectorAttribute(name = "producer.topic", type = "string", direction = OUTGOING, description = "The topic to publish messages, by default the channel name") @ConnectorAttribute(name = "producer.max-inflight-messages", type = "long", direction = OUTGOING, description = "The maximum number of messages to be written to Solace broker. It limits the number of messages waiting to be written and acknowledged by the broker. You can set this attribute to `0` remove the limit", defaultValue = "1024") @ConnectorAttribute(name = "producer.waitForPublishReceipt", type = "boolean", direction = OUTGOING, description = "Whether the client waits to receive the publish receipt from Solace broker before acknowledging the message", defaultValue = "true") -@ConnectorAttribute(name = "producer.delivery.ack.timeout", type = "int", direction = OUTGOING, description = "Delivery ack timeout") -@ConnectorAttribute(name = "producer.delivery.ack.window.size", type = "int", direction = OUTGOING, description = "Delivery ack window size") -@ConnectorAttribute(name = "producer.back-pressure.strategy", type = "string", direction = OUTGOING, description = "Outgoing messages backpressure strategy", defaultValue = "reject") +@ConnectorAttribute(name = "producer.delivery.ack.timeout", type = "int", direction = OUTGOING, description = "Timeout to receive the publish receipt from broker.") +@ConnectorAttribute(name = "producer.delivery.ack.window.size", type = "int", direction = OUTGOING, description = "Publish Window will determine the maximum number of messages the application can send before the Solace API must receive an acknowledgment from the Solace.") +@ConnectorAttribute(name = "producer.back-pressure.strategy", type = "string", direction = OUTGOING, description = "It is possible for the client application to publish messages more quickly than the API can send them to the broker due to network congestion or connectivity issues. This delay can cause the internal buffer to accumulate messages until it reaches its capacity, preventing the API from storing any more messages.", defaultValue = "reject") @ConnectorAttribute(name = "producer.back-pressure.buffer-capacity", type = "int", direction = OUTGOING, description = "Outgoing messages backpressure buffer capacity", defaultValue = "1024") public class SolaceConnector implements InboundConnector, OutboundConnector, HealthReporter {