diff --git a/.github/workflows/help-command.yml b/.github/workflows/help-command.yml
index f4955c22..d4ba4a44 100644
--- a/.github/workflows/help-command.yml
+++ b/.github/workflows/help-command.yml
@@ -27,13 +27,13 @@ jobs:
repo: context.repo.repo,
body: `Hello, @${{ github.actor }}! 👋🏼
- I'm Genie from the magic lamp. Looks like somebody needs a hand! 🆘
+ I'm 🧞🧞🧞 Genie 🧞🧞🧞 from the magic lamp. Looks like somebody needs a hand!
At the moment the following comments are supported in pull requests:
- - `/ready-to-merge` or `/rtm` - This comment will trigger automerge of PR in case all required checks are green, approvals in place and do-not-merge label is not added
- - `/do-not-merge` or `/dnm` - This comment will block automerging even if all conditions are met and ready-to-merge label is added
- - `/autoupdate` or `/au` - This comment will add `autoupdate` label to the PR and keeps your PR up-to-date to the target branch's future changes. Unless there is a merge conflict or it is a draft PR.`
+ - \`/ready-to-merge\` or \`/rtm\` - This comment will trigger automerge of PR in case all required checks are green, approvals in place and do-not-merge label is not added
+ - \`/do-not-merge\` or \`/dnm\` - This comment will block automerging even if all conditions are met and ready-to-merge label is added
+ - \`/autoupdate\` or \`/au\` - This comment will add \`autoupdate\` label to the PR and keeps your PR up-to-date to the target branch's future changes. Unless there is a merge conflict or it is a draft PR.`
})
create_help_comment_issue:
@@ -51,10 +51,10 @@ jobs:
repo: context.repo.repo,
body: `Hello, @${{ github.actor }}! 👋🏼
- I'm Genie from the magic lamp. Looks like somebody needs a hand! 🆘
+ I'm 🧞🧞🧞 Genie 🧞🧞🧞 from the magic lamp. Looks like somebody needs a hand!
At the moment the following comments are supported in issues:
- - `/good-first-issue {js | ts | java | go | docs | design | ci-cd} ` or `/gfi {js | ts | java | go | docs | design | ci-cd} ` - label an issue as a `good first issue`.
- example: `/gfi js` or `/good-first-issue ci-cd`
- })
+ - \`/good-first-issue {js | ts | java | go | docs | design | ci-cd}\` or \`/gfi {js | ts | java | go | docs | design | ci-cd}\` - label an issue as a \`good first issue\`.
+ example: \`/gfi js\` or \`/good-first-issue ci-cd\``
+ })
\ No newline at end of file
diff --git a/CODEOWNERS b/CODEOWNERS
index ca50f0c4..622691b1 100644
--- a/CODEOWNERS
+++ b/CODEOWNERS
@@ -10,6 +10,7 @@
/anypointmq/ @GeraldLoeffler
/ibmmq/ @rcoppen
+/jms/ @rcoppen @SrfHead
/kafka/ @lbroudoux @dalelane
/googlepubsub/ @whitlockjc
/solace/ @damaru-inc @CameronRushton
diff --git a/jms/README.md b/jms/README.md
index 4e4d327d..28f2b0d6 100644
--- a/jms/README.md
+++ b/jms/README.md
@@ -3,25 +3,97 @@
This document defines how to describe JMS-specific information on AsyncAPI.
+## Versions
-## Version
+The version of this bindings specification is `0.0.1`.
+This is also the `bindingVersion` for all binding objects defined by this specification.
+In any given binding object, `latest` MAY alternatively be used to refer to the currently latest published version of this bindings specification.
-Current version is `0.1.0`.
+## Terminology
+
+The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this bindings specification are to be interpreted as described in IETF [RFC2119](https://www.ietf.org/rfc/rfc2119.txt).
+
+## Protocol
+
+These bindings use the `jms` [protocol](https://github.com/asyncapi/spec/blob/master/spec/asyncapi.md#definitionsProtocol) in AsyncAPI documents to denote connections to and interactions with JMS message brokers.
+
+JMS is not technically a protocol, rather it is an API. A JMS Provider implements the JMS API and may define a protocol for implementing JMS API operations. Regardless, for the purposes of AsyncAPI we can treat it like a "protocol" to enable AsyncAPI definitions that are somewhat portable between various JMS Providers. If necessary, the user is free to combine this binding with other bindings that implement a JMS Provider (e.g. [Apache Pulsar](https://github.com/asyncapi/bindings/tree/master/pulsar), [Amazon SQS](https://github.com/asyncapi/bindings/tree/master/sqs), [IBM MQ](https://github.com/asyncapi/bindings/tree/master/ibmmq), etc.) to detail JMS Provider specific configuration.
+
+**NOTE** that from protocol version 3.0, this binding is compatible with [Jakarta Messaging](https://jakarta.ee/specifications/messaging).
+
+## Server Object
+
+The fields of the standard [Server Object](https://github.com/asyncapi/spec/blob/master/spec/asyncapi.md#serverObject) are constrained and interpreted as follows:
+
+Server Object Field Name | Values for JMS Protocol | Description
+---|:---|:---
+`protocol` | `jms` | **REQUIRED**. MUST be `jms` for the scope of this specification.
+`url` | e.g., `jms://host:port` | **REQUIRED**. MUST be a URL containing the hostname and port of a JMS Broker.
+`protocolVersion` | e.g., `3.1` | **OPTIONAL**, defaults to `3.1`. If present MUST be the version indicator of the JMS API. Valid values are `1.0`, `1.0.1`, `1.0.1a`, `1.0.2`, `1.0.2a`, `1.0.2b`, `1.1`, `2.0`, `2.0a`, `2.1`, or `3.0`, `3.1.`.
## Server Binding Object
-This object MUST NOT contain any properties. Its name is reserved for future use.
-
+The JMS [Server Binding Object](https://github.com/asyncapi/spec/blob/master/spec/asyncapi.md#server-bindings-object) is defined by a [JSON Schema](json_schemas/server.json), which defines these fields:
+
+Field Name | Type | Description
+---|:---:|---
+`jmsConnectionFactory` | string | **REQUIRED**. The classname of the [ConnectionFactory](https://docs.oracle.com/javaee/7/api/javax/jms/ConnectionFactory.html) implementation for the JMS Provider.
+`properties` | [Schema Array](https://github.com/asyncapi/spec/blob/master/spec/asyncapi.md#schemaArray) | **OPTIONAL**. Additional properties to set on the JMS ConnectionFactory implementation for the JMS Provider.
+`clientID` | string | **OPTIONAL**. A client identifier for applications that use this JMS connection factory. If the Client ID Policy is set to 'Restricted' (the default), then configuring a Client ID on the [ConnectionFactory](https://docs.oracle.com/javaee/7/api/javax/jms/ConnectionFactory.html) prevents more than one JMS client from using a connection from this factory.
+`bindingVersion` | string | **OPTIONAL**, defaults to `latest`. The version of this binding.
+
+### Examples
+
+The following example shows a `servers` object with a server binding object for `jms` with JMS specific properties:
+
+```yaml
+servers:
+ production:
+ url: jms://my-activemq-broker:61616
+ protocol: jms
+ protocolVersion: '1.1'
+ description: The production ActiveMQ broker accessed via JMS.
+ bindings:
+ jms:
+ # JMS protocol specific server details
+ jmsConnectionFactory: org.apache.activemq.ActiveMQConnectionFactory
+ properties:
+ - name: disableTimeStampsByDefault
+ value: false
+ clientID: my-application-1
+```
-
## Channel Binding Object
-This object MUST NOT contain any properties. Its name is reserved for future use.
+The JMS [Channel Binding Object](https://github.com/asyncapi/spec/blob/master/spec/asyncapi.md#channel-bindings-object) is defined by a [JSON Schema](json_schemas/channel.json), which defines these fields:
+
+Field Name | Type | Description
+---|:---:|---
+`destination` | string | **OPTIONAL**, defaults to the channel name. The destination (queue) name for this channel. SHOULD only be specified if the channel name differs from the actual destination name, such as when the channel name is not a valid destination name according to the JMS Provider.
+`destinationType` | string | **OPTIONAL**, defaults to `queue`. The type of destination, which MUST be either `queue`, or `fifo-queue`. SHOULD be specified to document the messaging model (point-to-point, or strict message ordering) supported by this channel.
+`bindingVersion` | string | **OPTIONAL**, defaults to `latest`. The version of this binding.
+
+### Examples
+
+The following example shows a `channels` object with two channels, the second having a channel binding object for `jms`:
+
+```yaml
+channels:
+ user.signup:
+ description: This application receives command messages from this channel about users to sign up.
+ bindings:
+ jms:
+ destination: user-sign-up
+ destinationType: fifo-queue
+ bindingVersion: '0.0.1'
+ publish:
+ #...
+```
@@ -37,4 +109,50 @@ This object MUST NOT contain any properties. Its name is reserved for future use
## Message Binding Object
-This object MUST NOT contain any properties. Its name is reserved for future use.
+The JMS [Message Binding Object](https://github.com/asyncapi/spec/blob/master/spec/asyncapi.md#message-bindings-object) is defined by a [JSON Schema](json_schemas/message.json), which defines these fields:
+
+Field Name | Type | Description
+---|:---:|---
+`headers` | [Schema Object](https://github.com/asyncapi/spec/blob/master/spec/asyncapi.md#schemaObject) | **OPTIONAL**. A Schema object containing the definitions for JMS specific headers (so-called protocol headers). This schema MUST be of type `object` and have a `properties` key. Examples of JMS protocol headers are `JMSMessageID`, `JMSTimestamp`, and `JMSCorrelationID`.
+`bindingVersion` | string | **OPTIONAL**, defaults to `latest`. The version of this binding.
+
+Note that application headers must be specified in the [`headers` field of the standard Message Object](https://github.com/asyncapi/spec/blob/master/spec/asyncapi.md#messageObjectHeaders) and are set as [Message Properties](https://docs.oracle.com/javaee/7/api/javax/jms/Message.html#Message%20Properties) of the JMS Message; how they are transmitted is defined by the JMS Provider and need not be considered here.
+In contrast, protocol headers such as `JMSMessageID` must be specified in the [`headers` field of the message binding object](#messageBindingObjectHeaders) and are transmitted in the [`headers` section of the JMS message](https://docs.oracle.com/javaee/7/api/javax/jms/Message.html#Message%20Headers).
+
+### Examples
+
+The following example shows a `message` object with both application specific headers, and a message binding object for `jms` with JMS specific headers:
+
+```yaml
+message:
+ messageId: my-message-1
+ bindings:
+ jms:
+ headers:
+ # JMS protocol specific message headers
+ required:
+ - JMSMessageID
+ properties:
+ JMSMessageID:
+ name: JMSMessageID
+ description: A unique message identifier. This may be set by your JMS Provider on your behalf.
+ type: string
+ JMSReplyTo:
+ name: JMSReplyTo
+ description: The queue or topic that the message sender expects replies to.
+ type: string
+ headers:
+ # Application specific message headers
+ required:
+ - MyToken
+ - MyOperationID
+ properties:
+ MyToken:
+ name: MyToken
+ description: Some sort of identificaton token for the publishing application.
+ type: string
+ MyOperationID:
+ name: MyOperationID
+ description: Some sort of unique identifier for the application operation to perform.
+ type: string
+```
diff --git a/jms/json_schemas/channel.json b/jms/json_schemas/channel.json
new file mode 100644
index 00000000..4f441cc4
--- /dev/null
+++ b/jms/json_schemas/channel.json
@@ -0,0 +1,40 @@
+{
+ "$schema": "http://json-schema.org/draft-07/schema#",
+ "$id": "http://asyncapi.com/bindings/jms/channel.json",
+ "title": "Channel Schema",
+ "description": "This object contains configuration for describing a JMS queue, or FIFO queue as an AsyncAPI channel. This objects only contains configuration that can not be provided in the AsyncAPI standard channel object.",
+ "type": "object",
+ "additionalProperties": false,
+ "patternProperties": {
+ "^x-[\\w\\d\\.\\-\\_]+$": {
+ "$ref": "https://raw.githubusercontent.com/asyncapi/asyncapi-node/v2.7.7/schemas/2.0.0.json#/definitions/specificationExtension"
+ }
+ },
+ "properties": {
+ "destination": {
+ "type": "string",
+ "description": "The destination (queue) name for this channel. SHOULD only be specified if the channel name differs from the actual destination name, such as when the channel name is not a valid destination name according to the JMS Provider. Defaults to the channel name."
+ },
+ "destinationType": {
+ "type": "string",
+ "enum": ["queue", "fifo-queue"],
+ "default": "queue",
+ "description": "The type of destination. SHOULD be specified to document the messaging model (point-to-point, or strict message ordering) supported by this channel."
+ },
+ "bindingVersion": {
+ "type": "string",
+ "enum": [
+ "0.0.1"
+ ],
+ "description": "The version of this binding. If omitted, 'latest' MUST be assumed."
+ }
+
+ },
+ "examples": [
+ {
+ "destination": "user-signed-up",
+ "destinationType": "fifo-queue",
+ "bindingVersion": "0.0.1"
+ }
+ ]
+}
diff --git a/jms/json_schemas/message.json b/jms/json_schemas/message.json
new file mode 100644
index 00000000..4c14347e
--- /dev/null
+++ b/jms/json_schemas/message.json
@@ -0,0 +1,73 @@
+{
+ "$schema": "http://json-schema.org/draft-07/schema#",
+ "$id": "http://asyncapi.com/bindings/jms/message.json",
+ "title": "Message Schema",
+ "description": "This object contains configuration for describing a JMS message as an AsyncAPI message. This objects only contains configuration that can not be provided in the AsyncAPI standard message object.",
+ "type": "object",
+ "additionalProperties": false,
+ "patternProperties": {
+ "^x-[\\w\\d\\.\\-\\_]+$": {
+ "$ref": "https://raw.githubusercontent.com/asyncapi/asyncapi-node/v2.7.7/schemas/2.0.0.json#/definitions/specificationExtension"
+ }
+ },
+ "properties": {
+ "headers": {
+ "$ref": "https://raw.githubusercontent.com/asyncapi/asyncapi-node/v2.7.7/schemas/2.0.0.json#/definitions/schema",
+ "description": "A Schema object containing the definitions for JMS headers (protocol headers). This schema MUST be of type 'object' and have a 'properties' key. Examples of JMS protocol headers are 'JMSMessageID', 'JMSTimestamp', and 'JMSCorrelationID'."
+ },
+ "bindingVersion": {
+ "type": "string",
+ "enum": [
+ "0.0.1"
+ ],
+ "description": "The version of this binding. If omitted, 'latest' MUST be assumed."
+ }
+
+ },
+ "examples": [
+ {
+ "headers": {
+ "type": "object",
+ "required": ["JMSMessageID"],
+ "properties": {
+ "JMSMessageID": {
+ "type": ["string", "null"],
+ "description": "A unique message identifier. This may be set by your JMS Provider on your behalf."
+ },
+ "JMSTimestamp": {
+ "type": "integer",
+ "description": "The time the message was sent. This may be set by your JMS Provider on your behalf. The time the message was sent. The value of the timestamp is the amount of time, measured in milliseconds, that has elapsed since midnight, January 1, 1970, UTC."
+ },
+ "JMSDeliveryMode": {
+ "type": "string",
+ "enum": ["PERSISTENT", "NON_PERSISTENT"],
+ "default": "PERSISTENT",
+ "description": "Denotes the delivery mode for the message. This may be set by your JMS Provider on your behalf."
+ },
+ "JMSPriority": {
+ "type": "integer",
+ "default": 4,
+ "description": "The priority of the message. This may be set by your JMS Provider on your behalf."
+ },
+ "JMSExpires": {
+ "type": "integer",
+ "description": "The time at which the message expires. This may be set by your JMS Provider on your behalf. A value of zero means that the message does not expire. Any non-zero value is the amount of time, measured in milliseconds, that has elapsed since midnight, January 1, 1970, UTC, at which the message will expire."
+ },
+ "JMSType": {
+ "type": ["string", "null"],
+ "description": "The type of message. Some JMS providers use a message repository that contains the definitions of messages sent by applications. The 'JMSType' header field may reference a message's definition in the provider's repository. The JMS API does not define a standard message definition repository, nor does it define a naming policy for the definitions it contains. Some messaging systems require that a message type definition for each application message be created and that each message specify its type. In order to work with such JMS providers, JMS clients should assign a value to 'JMSType', whether the application makes use of it or not. This ensures that the field is properly set for those providers that require it."
+ },
+ "JMSCorrelationID": {
+ "type": ["string", "null"],
+ "description": "The correlation identifier of the message. A client can use the 'JMSCorrelationID' header field to link one message with another. A typical use is to link a response message with its request message. Since each message sent by a JMS provider is assigned a message ID value, it is convenient to link messages via message ID, such message ID values must start with the 'ID:' prefix. Conversely, application-specified values must not start with the 'ID:' prefix; this is reserved for provider-generated message ID values."
+ },
+ "JMSReplyTo": {
+ "type": "string",
+ "description": "The queue or topic that the message sender expects replies to."
+ }
+ }
+ },
+ "bindingVersion": "0.0.1"
+ }
+ ]
+}
diff --git a/jms/json_schemas/server.json b/jms/json_schemas/server.json
new file mode 100644
index 00000000..c2810f7e
--- /dev/null
+++ b/jms/json_schemas/server.json
@@ -0,0 +1,69 @@
+{
+ "$schema": "http://json-schema.org/draft-07/schema#",
+ "$id": "http://asyncapi.com/bindings/jms/server.json",
+ "title": "Server Schema",
+ "description": "This object contains configuration for describing a JMS broker as an AsyncAPI server. This objects only contains configuration that can not be provided in the AsyncAPI standard server object.",
+ "type": "object",
+ "additionalProperties": false,
+ "patternProperties": {
+ "^x-[\\w\\d\\.\\-\\_]+$": {
+ "$ref": "https://raw.githubusercontent.com/asyncapi/asyncapi-node/v2.7.7/schemas/2.0.0.json#/definitions/specificationExtension"
+ }
+ },
+ "required": ["jmsConnectionFactory"],
+ "properties": {
+ "jmsConnectionFactory": {
+ "type": "string",
+ "description": "The classname of the ConnectionFactory implementation for the JMS Provider."
+ },
+ "properties": {
+ "type": "array",
+ "items": {
+ "$ref": "#/schemas/property"
+ },
+ "description": "Additional properties to set on the JMS ConnectionFactory implementation for the JMS Provider."
+ },
+ "clientID": {
+ "type": "string",
+ "description": "A client identifier for applications that use this JMS connection factory. If the Client ID Policy is set to 'Restricted' (the default), then configuring a Client ID on the ConnectionFactory prevents more than one JMS client from using a connection from this factory."
+ },
+ "bindingVersion": {
+ "type": "string",
+ "enum": [
+ "0.0.1"
+ ],
+ "description": "The version of this binding. If omitted, 'latest' MUST be assumed."
+ }
+
+ },
+ "schemas": {
+ "property": {
+ "type": "object",
+ "required": ["name", "value"],
+ "properties": {
+ "name": {
+ "type": "string",
+ "description": "The name of a property"
+ },
+ "value": {
+ "type": ["string", "boolean", "number", "null"],
+ "description": "The name of a property"
+ }
+ }
+ }
+ },
+ "examples": [
+ {
+ "jmsConnectionFactory": "org.apache.activemq.ActiveMQConnectionFactory",
+ "properties": [
+ {
+ "name": "disableTimeStampsByDefault",
+ "value": false
+ }
+ ],
+ "clientID": "my-application-1",
+ "bindingVersion": "0.0.1"
+ }
+ ]
+ }
+
\ No newline at end of file