Skip to content

Commit

Permalink
feat: upgraded library versions, better support for Solace queues (#119)
Browse files Browse the repository at this point in the history
* We how handle smf bindings properly.

* Updated readme, fixed linter problems.

* Simplified functions to make sonarcloud happy.

* Fixed linter problems.

* Removed unused topicInfo filter.

* Removed dead code.

Co-authored-by: Michael Davis <[email protected]>
  • Loading branch information
damaru-inc and MichaelDavisSolace authored Jun 22, 2021
1 parent 768f9cd commit 5b1858e
Show file tree
Hide file tree
Showing 8 changed files with 265 additions and 283 deletions.
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,10 @@ It is possible to override this, see the 'view' parameter in the parameters sect

### Which Methods are created
The template works as follows:
* By default for each channel in the AsyncAPI document, if there is a _publish_ operation a _Supplier_ method will be generated, and for a _subscribe_ operation a _Consumer_ method will get generated.
* By default for each channel in the AsyncAPI document, if there is a _subscribe_ operation a _Supplier_ method will be generated, and for a _publish_ operation a _Consumer_ method will get generated.
* To customize this default behavior you can make use of the `x-scs-function-name` extension. If one _publish_ operation and one _subscribe_ operation share a `x-scs-function-name` attribute then a _java.util.function.Function_ method will be created which uses the _subscribe_ operation's message as the input and the _publish_ operation's message as the output to the generated Function method. It will also wire up the proper channel information in the generated application.yaml file.
* Note that at this time the generator does not support the creation of functions that have more than one _publish_ and/or more than one _subscribe_ operation with the same ```x-scs-function-name``` attribute. This scenario will result in error.
* Note that at this time the generator does not support the creation of functions that have more than one _publish_ and/or more than one _subscribe_ operation with the same ```x-scs-function-name``` attribute. This scenario will result in error.
* Additionally, if a channel has parameters and a _subscribe_ operation, a method will be generated that takes the payload and the parameters as function arguments, formats the topic from the parameters, and sends the message using the StreamBridge as described in the [Spring Cloud Steam](https://docs.spring.io/spring-cloud-stream/docs/3.1.3/reference/html/spring-cloud-stream.html#_streambridge_and_dynamic_destinations) documentation.


### Method Naming
Expand Down Expand Up @@ -93,7 +94,7 @@ password | | default | The client password connection property. Currently this o
reactive | | false | If true, the generated functions will use the Reactive style and use the Flux class.
solaceSpringCloudVersion | info.x-solace-spring-cloud-version | 1.0.0 | The version of the solace-spring-cloud-bom dependency used when generating an application.
springBootVersion | info.x-spring-boot-version | 2.2.6.RELEASE | The version of Spring Boot used when generating an application.
springCloudVersion | info.x-spring-cloud-version | Hoxton.SR3 | The version of the spring-cloud-dependencies BOM dependency used when generating an application.
springCloudVersion | info.x-spring-cloud-version | Hoxton.SR3 | The version of the spring-cloud-dependencies BOM dependency used when generating an application.
springCloudStreamVersion | info.x-spring-cloud-stream-version | 3.0.3.RELEASE | The version of the spring-cloud-stream dependency specified in the Maven file, when generating a library. When generating an application, the spring-cloud-dependencies BOM is used instead
username | | default | The client username connection property. Currently this only works with the Solace binder. When other binders are used this parameter is ignored.
view | info.x-view | client | By default, this template generates publisher code for subscribe operations and vice versa. You can switch this by setting this parameter to 'provider'.
Expand Down
Loading

0 comments on commit 5b1858e

Please sign in to comment.