From 9983b2129bd111e9f97ff964eebfb77ef79c9523 Mon Sep 17 00:00:00 2001
From: ctasada The following paragraphs describe how Springwolf works internally. When the Spring Boot application is started, Springwolf uses its scanners to find defined consumers and producers within the application.
-Based on the results, the channels/topics are extracted including payload type and merged together into an AsyncAPI conform document.@AmqpAsyncOperationBinding
",id:"amqpasyncoperationbinding",level:3},{value:"@KafkaAsyncOperationBinding
",id:"kafkaasyncoperationbinding",level:3},{value:"@JmsAsyncOperationBinding
",id:"jmsasyncoperationbinding",level:3},{value:"@SnsAsyncOperationBinding
",id:"snsasyncoperationbinding",level:3},{value:"@SqsAsyncOperationBinding
",id:"sqsasyncoperationbinding",level:3},{value:"Generic annotation",id:"generic-annotation",level:2},{value:"@AsyncGenericOperationBinding
",id:"asyncgenericoperationbinding",level:3},{value:"Binding properties",id:"binding-properties",level:2},{value:"General",id:"general",level:3},{value:"Queue Name (Channel Name)",id:"queue-name-channel-name",level:4},{value:"Description",id:"description",level:4},{value:"Payload Type",id:"payload-type",level:4},{value:"Headers",id:"headers",level:4},{value:"AMQP",id:"amqp",level:3},{value:"Exchange Name",id:"exchange-name",level:4},{value:"Routing Key",id:"routing-key",level:4},{value:"Kafka",id:"kafka",level:3},{value:"Group Id",id:"group-id",level:4},{value:"Client Id",id:"client-id",level:4},{value:"Google PubSub binding annotations",id:"google-pubsub-binding-annotations",level:3},{value:"Channel Binding Object",id:"channel-binding-object",level:4},{value:"Message Binding Object",id:"message-binding-object",level:4}];function l(e){const n={a:"a",code:"code",em:"em",h1:"h1",h2:"h2",h3:"h3",h4:"h4",li:"li",p:"p",pre:"pre",ul:"ul",...(0,o.a)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.h1,{id:"bindings",children:"Bindings"}),"\n",(0,s.jsx)(n.p,{children:"To indicate the binding (protocol) that's documented, there are multiple options to document them.\nAdd at least one binding so that readers know the protocol in use and functionality like publishing works."}),"\n",(0,s.jsxs)(n.p,{children:["To use the protocol specific bindings, ensure that you have added the corresponding ",(0,s.jsx)(n.a,{href:"/docs/introduction/supported-protocols",children:"plugin"}),"."]}),"\n",(0,s.jsx)(n.h2,{id:"protocol-specific-annotations",children:"Protocol specific annotations"}),"\n",(0,s.jsx)(n.h3,{id:"amqpasyncoperationbinding",children:(0,s.jsx)(n.code,{children:"@AmqpAsyncOperationBinding"})}),"\n",(0,s.jsxs)(n.p,{children:["Associate this operation with AMQP, see ",(0,s.jsx)(n.a,{href:"https://www.asyncapi.com/docs/reference/specification/v2.6.0#operationBindingsObject",children:"operation-binding"})," for details."]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-java",children:'@AmqpAsyncOperationBinding(cc = "example-topic-routing-key")\n'})}),"\n",(0,s.jsx)(n.h3,{id:"kafkaasyncoperationbinding",children:(0,s.jsx)(n.code,{children:"@KafkaAsyncOperationBinding"})}),"\n",(0,s.jsxs)(n.p,{children:["Associate this operation with Kafka, see ",(0,s.jsx)(n.a,{href:"https://www.asyncapi.com/docs/reference/specification/v2.6.0#operationBindingsObject",children:"operation-binding"})," for details."]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-java",children:'@KafkaAsyncOperationBinding(\n bindingVersion = "1"\n)\n'})}),"\n",(0,s.jsx)(n.h3,{id:"jmsasyncoperationbinding",children:(0,s.jsx)(n.code,{children:"@JmsAsyncOperationBinding"})}),"\n",(0,s.jsxs)(n.p,{children:["Associate this operation with JMS, see ",(0,s.jsx)(n.a,{href:"https://www.asyncapi.com/docs/reference/specification/v2.6.0#operationBindingsObject",children:"operation-binding"})," for details."]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-java",children:"@JmsAsyncOperationBinding\n"})}),"\n",(0,s.jsx)(n.h3,{id:"snsasyncoperationbinding",children:(0,s.jsx)(n.code,{children:"@SnsAsyncOperationBinding"})}),"\n",(0,s.jsxs)(n.p,{children:["Associate this operation with SNS, see ",(0,s.jsx)(n.a,{href:"https://www.asyncapi.com/docs/reference/specification/v2.6.0#operationBindingsObject",children:"operation-binding"})," for details."]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-java",children:"@SnsAsyncOperationBinding\n"})}),"\n",(0,s.jsx)(n.h3,{id:"sqsasyncoperationbinding",children:(0,s.jsx)(n.code,{children:"@SqsAsyncOperationBinding"})}),"\n",(0,s.jsxs)(n.p,{children:["Associate this operation with SQS, see ",(0,s.jsx)(n.a,{href:"https://www.asyncapi.com/docs/reference/specification/v2.6.0#operationBindingsObject",children:"operation-binding"})," for details."]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-java",children:"@SqsAsyncOperationBinding\n"})}),"\n",(0,s.jsx)(n.h2,{id:"generic-annotation",children:"Generic annotation"}),"\n",(0,s.jsx)(n.p,{children:"This binding is generic, so that any properties can be specified."}),"\n",(0,s.jsx)(n.h3,{id:"asyncgenericoperationbinding",children:(0,s.jsx)(n.code,{children:"@AsyncGenericOperationBinding"})}),"\n",(0,s.jsx)(n.p,{children:"You can define anything and there is no validation."}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-java",children:'@AsyncGenericOperationBinding(\n type = "custom-binding",\n fields = {\n "internal-field=customValue",\n "nested.key=nestedValue"\n }\n)\n'})}),"\n",(0,s.jsx)(n.h2,{id:"binding-properties",children:"Binding properties"}),"\n",(0,s.jsx)(n.p,{children:"Explanation of the different binding properties."}),"\n",(0,s.jsx)(n.h3,{id:"general",children:"General"}),"\n",(0,s.jsx)(n.p,{children:"The following properties are the same for all bindings."}),"\n",(0,s.jsx)(n.h4,{id:"queue-name-channel-name",children:"Queue Name (Channel Name)"}),"\n",(0,s.jsx)(n.p,{children:"The queue name that will be used to publish messages to by the UI."}),"\n",(0,s.jsx)(n.h4,{id:"description",children:"Description"}),"\n",(0,s.jsxs)(n.p,{children:["Optional. The description allows for human-friendly text to verbosely explain the ",(0,s.jsx)(n.em,{children:"message"}),", like specific domain, what the topic is used for and which data it contains."]}),"\n",(0,s.jsx)(n.h4,{id:"payload-type",children:"Payload Type"}),"\n",(0,s.jsx)(n.p,{children:"The class object of the payload that will be published to this channel."}),"\n",(0,s.jsx)(n.h4,{id:"headers",children:"Headers"}),"\n",(0,s.jsx)(n.p,{children:"The Kafka headers describing the metadata of the payload, more details in the generic ProducerData."}),"\n",(0,s.jsxs)(n.p,{children:["The Springwolf comes with a special ",(0,s.jsx)(n.code,{children:"AsyncHeadersCloudEventConstants"})," to document CloudEvents."]}),"\n",(0,s.jsxs)(n.p,{children:["The ",(0,s.jsx)(n.code,{children:"kafka"})," header ",(0,s.jsx)(n.code,{children:"__TypeId__"})," (constant from ",(0,s.jsx)(n.code,{children:" AbstractJavaTypeMapper.DEFAULT_CLASSID_FIELD_NAME"}),") can be documented as well."]}),"\n",(0,s.jsx)(n.h3,{id:"amqp",children:"AMQP"}),"\n",(0,s.jsx)(n.h4,{id:"exchange-name",children:"Exchange Name"}),"\n",(0,s.jsx)(n.p,{children:"The exchange name that will be used to bind queues to."}),"\n",(0,s.jsx)(n.h4,{id:"routing-key",children:"Routing Key"}),"\n",(0,s.jsx)(n.p,{children:"The routing key used when publishing a message."}),"\n",(0,s.jsx)(n.h3,{id:"kafka",children:"Kafka"}),"\n",(0,s.jsx)(n.h4,{id:"group-id",children:"Group Id"}),"\n",(0,s.jsx)(n.p,{children:"The group id that will be used during message consumption"}),"\n",(0,s.jsx)(n.h4,{id:"client-id",children:"Client Id"}),"\n",(0,s.jsx)(n.p,{children:"The client id to identify the consumer"}),"\n",(0,s.jsx)(n.h3,{id:"google-pubsub-binding-annotations",children:"Google PubSub binding annotations"}),"\n",(0,s.jsx)(n.h4,{id:"channel-binding-object",children:"Channel Binding Object"}),"\n",(0,s.jsx)(n.p,{children:"The Channel Bindings Object is used to describe the Google Cloud Pub/Sub Topic details."}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-java",children:'@GooglePubSubAsyncChannelBinding(\n messageRetentionDuration = "messageRetentionDuration",\n messageStoragePolicy =\n @GooglePubsubAsyncMessageStoragePolicy(allowedPersistenceRegions = {"region1", "region2"}),\n schemaSettings =\n @GooglePubSubAsyncSchemaSetting(\n encoding = "BINARY",\n firstRevisionId = "firstRevisionId",\n lastRevisionId = "lastRevisionId",\n name = "projects/{project}/schemas/{schema}"))\n'})}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.code,{children:"MessageRetentionDuration"}),": Indicates the minimum duration to retain a message after it's published to the topic"]}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.code,{children:"Message Storage Policy"}),": The Message Storage Policy Object is used to describe the Google Cloud Pub/Sub MessageStoragePolicy."]}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"A list of IDs of GCP regions where messages that are published to the topic may be persisted in storage"}),"\n"]}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.code,{children:"Schema Settings"}),":The"," Schema Settings Object is used to describe the Google Cloud Pub/Sub SchemaSettings."]}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"encoding: The encoding of the message"}),"\n",(0,s.jsx)(n.li,{children:"firstRevisionId: The minimum (inclusive) revision allowed for validating messages"}),"\n",(0,s.jsx)(n.li,{children:"lastRevisionId: The maximum (inclusive) revision allowed for validating messages"}),"\n",(0,s.jsxs)(n.li,{children:["name: The name of the schema that messages published should be validated against (The format is ",(0,s.jsx)(n.code,{children:"projects/{project}/schemas/{schema}"}),".)"]}),"\n"]}),"\n",(0,s.jsx)(n.h4,{id:"message-binding-object",children:"Message Binding Object"}),"\n",(0,s.jsx)(n.p,{children:"The Message Binding Object is used to describe the Google Cloud Pub/Sub PubsubMessage details, alongside with pertinent parts of the Google Cloud Pub/Sub Schema Object."}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-java",children:'@GooglePubSubAsyncMessageBinding(\n orderingKey = "key",\n schema = @GooglePubSubAsyncMessageSchema(name = "projects/{project}/schemas/{schema}"))\n'})}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.code,{children:"OrderingKey"}),": If non-empty, identifies related messages for which publish order should be respected"]}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.code,{children:"Schema Definition"}),": The Schema Definition Object is used to describe the Google Cloud Pub/Sub Schema Object with AsyncAPI. While some of this information could be, or is, described using native AsyncAPI, for consistency it makes sense to provide this information here at all times, especially for cases where AsyncAPI doesn't natively support describing payloads using a supported Google Cloud Pub/Sub schema format like Protobuf"]}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"name: The name of the schema"}),"\n"]})]})}function h(e={}){const{wrapper:n}={...(0,o.a)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(l,{...e})}):l(e)}},1151:(e,n,i)=>{i.d(n,{Z:()=>d,a:()=>t});var s=i(7294);const o={},a=s.createContext(o);function t(e){const n=s.useContext(a);return s.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function d(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:t(e.components),s.createElement(a.Provider,{value:n},e.children)}}}]);
\ No newline at end of file
+"use strict";(self.webpackChunkspringwolf_docs=self.webpackChunkspringwolf_docs||[]).push([[987],{6376:(e,n,i)=>{i.r(n),i.d(n,{assets:()=>c,contentTitle:()=>t,default:()=>h,frontMatter:()=>a,metadata:()=>d,toc:()=>r});var s=i(5893),o=i(1151);const a={sidebar_position:66},t="Bindings",d={id:"configuration/documenting-bindings",title:"Bindings",description:"To indicate the binding (protocol) that's documented, there are multiple options to document them.",source:"@site/docs/configuration/documenting-bindings.md",sourceDirName:"configuration",slug:"/configuration/documenting-bindings",permalink:"/docs/configuration/documenting-bindings",draft:!1,unlisted:!1,editUrl:"https://github.com/springwolf/springwolf.github.io/edit/master/docs/configuration/documenting-bindings.md",tags:[],version:"current",sidebarPosition:66,frontMatter:{sidebar_position:66},sidebar:"tutorialSidebar",previous:{title:"Producers",permalink:"/docs/configuration/documenting-producers"},next:{title:"Messages",permalink:"/docs/configuration/documenting-messages"}},c={},r=[{value:"Protocol specific annotations",id:"protocol-specific-annotations",level:2},{value:"@AmqpAsyncOperationBinding
",id:"amqpasyncoperationbinding",level:3},{value:"@KafkaAsyncOperationBinding
",id:"kafkaasyncoperationbinding",level:3},{value:"@JmsAsyncOperationBinding
",id:"jmsasyncoperationbinding",level:3},{value:"@SnsAsyncOperationBinding
",id:"snsasyncoperationbinding",level:3},{value:"@SqsAsyncOperationBinding
",id:"sqsasyncoperationbinding",level:3},{value:"Generic annotation",id:"generic-annotation",level:2},{value:"@AsyncGenericOperationBinding
",id:"asyncgenericoperationbinding",level:3},{value:"Binding properties",id:"binding-properties",level:2},{value:"General",id:"general",level:3},{value:"Queue Name (Channel Name)",id:"queue-name-channel-name",level:4},{value:"Description",id:"description",level:4},{value:"Payload Type",id:"payload-type",level:4},{value:"Headers",id:"headers",level:4},{value:"AMQP",id:"amqp",level:3},{value:"Exchange Name",id:"exchange-name",level:4},{value:"Routing Key",id:"routing-key",level:4},{value:"Kafka",id:"kafka",level:3},{value:"Group Id",id:"group-id",level:4},{value:"Client Id",id:"client-id",level:4},{value:"Google PubSub binding annotations",id:"google-pubsub-binding-annotations",level:3},{value:"Channel Binding Object",id:"channel-binding-object",level:4},{value:"Message Binding Object",id:"message-binding-object",level:4}];function l(e){const n={a:"a",code:"code",em:"em",h1:"h1",h2:"h2",h3:"h3",h4:"h4",li:"li",p:"p",pre:"pre",ul:"ul",...(0,o.a)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.h1,{id:"bindings",children:"Bindings"}),"\n",(0,s.jsx)(n.p,{children:"To indicate the binding (protocol) that's documented, there are multiple options to document them.\nAdd at least one binding so that readers know the protocol in use and functionality like publishing works."}),"\n",(0,s.jsxs)(n.p,{children:["To use the protocol specific bindings, ensure that you have added the corresponding ",(0,s.jsx)(n.a,{href:"/docs/introduction/supported-protocols",children:"plugin"}),"."]}),"\n",(0,s.jsx)(n.h2,{id:"protocol-specific-annotations",children:"Protocol specific annotations"}),"\n",(0,s.jsx)(n.h3,{id:"amqpasyncoperationbinding",children:(0,s.jsx)(n.code,{children:"@AmqpAsyncOperationBinding"})}),"\n",(0,s.jsxs)(n.p,{children:["Associate this operation with AMQP, see ",(0,s.jsx)(n.a,{href:"https://www.asyncapi.com/docs/reference/specification/v3.0.0#operationBindingsObject",children:"operation-binding"})," for details."]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-java",children:'@AmqpAsyncOperationBinding(cc = "example-topic-routing-key")\n'})}),"\n",(0,s.jsx)(n.h3,{id:"kafkaasyncoperationbinding",children:(0,s.jsx)(n.code,{children:"@KafkaAsyncOperationBinding"})}),"\n",(0,s.jsxs)(n.p,{children:["Associate this operation with Kafka, see ",(0,s.jsx)(n.a,{href:"https://www.asyncapi.com/docs/reference/specification/v3.0.0#operationBindingsObject",children:"operation-binding"})," for details."]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-java",children:'@KafkaAsyncOperationBinding(\n bindingVersion = "1"\n)\n'})}),"\n",(0,s.jsx)(n.h3,{id:"jmsasyncoperationbinding",children:(0,s.jsx)(n.code,{children:"@JmsAsyncOperationBinding"})}),"\n",(0,s.jsxs)(n.p,{children:["Associate this operation with JMS, see ",(0,s.jsx)(n.a,{href:"https://www.asyncapi.com/docs/reference/specification/v3.0.0#operationBindingsObject",children:"operation-binding"})," for details."]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-java",children:"@JmsAsyncOperationBinding\n"})}),"\n",(0,s.jsx)(n.h3,{id:"snsasyncoperationbinding",children:(0,s.jsx)(n.code,{children:"@SnsAsyncOperationBinding"})}),"\n",(0,s.jsxs)(n.p,{children:["Associate this operation with SNS, see ",(0,s.jsx)(n.a,{href:"https://www.asyncapi.com/docs/reference/specification/v3.0.0#operationBindingsObject",children:"operation-binding"})," for details."]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-java",children:"@SnsAsyncOperationBinding\n"})}),"\n",(0,s.jsx)(n.h3,{id:"sqsasyncoperationbinding",children:(0,s.jsx)(n.code,{children:"@SqsAsyncOperationBinding"})}),"\n",(0,s.jsxs)(n.p,{children:["Associate this operation with SQS, see ",(0,s.jsx)(n.a,{href:"https://www.asyncapi.com/docs/reference/specification/v3.0.0#operationBindingsObject",children:"operation-binding"})," for details."]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-java",children:"@SqsAsyncOperationBinding\n"})}),"\n",(0,s.jsx)(n.h2,{id:"generic-annotation",children:"Generic annotation"}),"\n",(0,s.jsx)(n.p,{children:"This binding is generic, so that any properties can be specified."}),"\n",(0,s.jsx)(n.h3,{id:"asyncgenericoperationbinding",children:(0,s.jsx)(n.code,{children:"@AsyncGenericOperationBinding"})}),"\n",(0,s.jsx)(n.p,{children:"You can define anything and there is no validation."}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-java",children:'@AsyncGenericOperationBinding(\n type = "custom-binding",\n fields = {\n "internal-field=customValue",\n "nested.key=nestedValue"\n }\n)\n'})}),"\n",(0,s.jsx)(n.h2,{id:"binding-properties",children:"Binding properties"}),"\n",(0,s.jsx)(n.p,{children:"Explanation of the different binding properties."}),"\n",(0,s.jsx)(n.h3,{id:"general",children:"General"}),"\n",(0,s.jsx)(n.p,{children:"The following properties are the same for all bindings."}),"\n",(0,s.jsx)(n.h4,{id:"queue-name-channel-name",children:"Queue Name (Channel Name)"}),"\n",(0,s.jsx)(n.p,{children:"The queue name that will be used to publish messages to by the UI."}),"\n",(0,s.jsx)(n.h4,{id:"description",children:"Description"}),"\n",(0,s.jsxs)(n.p,{children:["Optional. The description allows for human-friendly text to verbosely explain the ",(0,s.jsx)(n.em,{children:"message"}),", like specific domain, what the topic is used for and which data it contains."]}),"\n",(0,s.jsx)(n.h4,{id:"payload-type",children:"Payload Type"}),"\n",(0,s.jsx)(n.p,{children:"The class object of the payload that will be published to this channel."}),"\n",(0,s.jsx)(n.h4,{id:"headers",children:"Headers"}),"\n",(0,s.jsx)(n.p,{children:"The Kafka headers describing the metadata of the payload, more details in the generic ProducerData."}),"\n",(0,s.jsxs)(n.p,{children:["The Springwolf comes with a special ",(0,s.jsx)(n.code,{children:"AsyncHeadersCloudEventConstants"})," to document CloudEvents."]}),"\n",(0,s.jsxs)(n.p,{children:["The ",(0,s.jsx)(n.code,{children:"kafka"})," header ",(0,s.jsx)(n.code,{children:"__TypeId__"})," (constant from ",(0,s.jsx)(n.code,{children:" AbstractJavaTypeMapper.DEFAULT_CLASSID_FIELD_NAME"}),") can be documented as well."]}),"\n",(0,s.jsx)(n.h3,{id:"amqp",children:"AMQP"}),"\n",(0,s.jsx)(n.h4,{id:"exchange-name",children:"Exchange Name"}),"\n",(0,s.jsx)(n.p,{children:"The exchange name that will be used to bind queues to."}),"\n",(0,s.jsx)(n.h4,{id:"routing-key",children:"Routing Key"}),"\n",(0,s.jsx)(n.p,{children:"The routing key used when publishing a message."}),"\n",(0,s.jsx)(n.h3,{id:"kafka",children:"Kafka"}),"\n",(0,s.jsx)(n.h4,{id:"group-id",children:"Group Id"}),"\n",(0,s.jsx)(n.p,{children:"The group id that will be used during message consumption"}),"\n",(0,s.jsx)(n.h4,{id:"client-id",children:"Client Id"}),"\n",(0,s.jsx)(n.p,{children:"The client id to identify the consumer"}),"\n",(0,s.jsx)(n.h3,{id:"google-pubsub-binding-annotations",children:"Google PubSub binding annotations"}),"\n",(0,s.jsx)(n.h4,{id:"channel-binding-object",children:"Channel Binding Object"}),"\n",(0,s.jsx)(n.p,{children:"The Channel Bindings Object is used to describe the Google Cloud Pub/Sub Topic details."}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-java",children:'@GooglePubSubAsyncChannelBinding(\n messageRetentionDuration = "messageRetentionDuration",\n messageStoragePolicy =\n @GooglePubsubAsyncMessageStoragePolicy(allowedPersistenceRegions = {"region1", "region2"}),\n schemaSettings =\n @GooglePubSubAsyncSchemaSetting(\n encoding = "BINARY",\n firstRevisionId = "firstRevisionId",\n lastRevisionId = "lastRevisionId",\n name = "projects/{project}/schemas/{schema}"))\n'})}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.code,{children:"MessageRetentionDuration"}),": Indicates the minimum duration to retain a message after it's published to the topic"]}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.code,{children:"Message Storage Policy"}),": The Message Storage Policy Object is used to describe the Google Cloud Pub/Sub MessageStoragePolicy."]}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"A list of IDs of GCP regions where messages that are published to the topic may be persisted in storage"}),"\n"]}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.code,{children:"Schema Settings"}),":The"," Schema Settings Object is used to describe the Google Cloud Pub/Sub SchemaSettings."]}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"encoding: The encoding of the message"}),"\n",(0,s.jsx)(n.li,{children:"firstRevisionId: The minimum (inclusive) revision allowed for validating messages"}),"\n",(0,s.jsx)(n.li,{children:"lastRevisionId: The maximum (inclusive) revision allowed for validating messages"}),"\n",(0,s.jsxs)(n.li,{children:["name: The name of the schema that messages published should be validated against (The format is ",(0,s.jsx)(n.code,{children:"projects/{project}/schemas/{schema}"}),".)"]}),"\n"]}),"\n",(0,s.jsx)(n.h4,{id:"message-binding-object",children:"Message Binding Object"}),"\n",(0,s.jsx)(n.p,{children:"The Message Binding Object is used to describe the Google Cloud Pub/Sub PubsubMessage details, alongside with pertinent parts of the Google Cloud Pub/Sub Schema Object."}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-java",children:'@GooglePubSubAsyncMessageBinding(\n orderingKey = "key",\n schema = @GooglePubSubAsyncMessageSchema(name = "projects/{project}/schemas/{schema}"))\n'})}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.code,{children:"OrderingKey"}),": If non-empty, identifies related messages for which publish order should be respected"]}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.code,{children:"Schema Definition"}),": The Schema Definition Object is used to describe the Google Cloud Pub/Sub Schema Object with AsyncAPI. While some of this information could be, or is, described using native AsyncAPI, for consistency it makes sense to provide this information here at all times, especially for cases where AsyncAPI doesn't natively support describing payloads using a supported Google Cloud Pub/Sub schema format like Protobuf"]}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"name: The name of the schema"}),"\n"]})]})}function h(e={}){const{wrapper:n}={...(0,o.a)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(l,{...e})}):l(e)}},1151:(e,n,i)=>{i.d(n,{Z:()=>d,a:()=>t});var s=i(7294);const o={},a=s.createContext(o);function t(e){const n=s.useContext(a);return s.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function d(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:t(e.components),s.createElement(a.Provider,{value:n},e.children)}}}]);
\ No newline at end of file
diff --git a/assets/js/runtime~main.9da98919.js b/assets/js/runtime~main.44a073b6.js
similarity index 77%
rename from assets/js/runtime~main.9da98919.js
rename to assets/js/runtime~main.44a073b6.js
index 9225572..2714625 100644
--- a/assets/js/runtime~main.9da98919.js
+++ b/assets/js/runtime~main.44a073b6.js
@@ -1 +1 @@
-(()=>{"use strict";var e,t,r,a,o,n={},f={};function i(e){var t=f[e];if(void 0!==t)return t.exports;var r=f[e]={exports:{}};return n[e].call(r.exports,r,r.exports,i),r.exports}i.m=n,e=[],i.O=(t,r,a,o)=>{if(!r){var n=1/0;for(b=0;bBig Picture
The AsyncAPI document is accessible an endpoint. When the Springwolf UI is opened, the browser fetches the document and renders it (see demo).
When publishing is enabled, the user can publish a message through the UI to another endpoint. @@ -25,7 +25,7 @@
springwolf-core
runs all scanners and merges the found results together into one AsyncAPI document.
When the same channel/topic is found multiple times, it's merged as well.
The result is a ChannelItem
.
+
The result is a ChannelItem
.
The ChannelObject
contains the Message
for the receive and/or send operation.
When the scanners scan and build the result, they also extract the payload type. diff --git a/docs/configuration/customizing/index.html b/docs/configuration/customizing/index.html index 5dfe1dc..c9e96f9 100644 --- a/docs/configuration/customizing/index.html +++ b/docs/configuration/customizing/index.html @@ -4,7 +4,7 @@
To use the protocol specific bindings, ensure that you have added the corresponding plugin.
@AmqpAsyncOperationBinding
Associate this operation with AMQP, see operation-binding for details.
+Associate this operation with AMQP, see operation-binding for details.
@AmqpAsyncOperationBinding(cc = "example-topic-routing-key")
@KafkaAsyncOperationBinding
Associate this operation with Kafka, see operation-binding for details.
+Associate this operation with Kafka, see operation-binding for details.
@KafkaAsyncOperationBinding(
bindingVersion = "1"
)
@JmsAsyncOperationBinding
Associate this operation with JMS, see operation-binding for details.
+Associate this operation with JMS, see operation-binding for details.
@JmsAsyncOperationBinding
@SnsAsyncOperationBinding
Associate this operation with SNS, see operation-binding for details.
+Associate this operation with SNS, see operation-binding for details.
@SnsAsyncOperationBinding
@SqsAsyncOperationBinding
Associate this operation with SQS, see operation-binding for details.
+Associate this operation with SQS, see operation-binding for details.
@SqsAsyncOperationBinding
This binding is generic, so that any properties can be specified.
diff --git a/docs/configuration/documenting-consumers/index.html b/docs/configuration/documenting-consumers/index.html index 178278b..256dc58 100644 --- a/docs/configuration/documenting-consumers/index.html +++ b/docs/configuration/documenting-consumers/index.html @@ -4,7 +4,7 @@