Solace Spring Cloud Stream Binder AMQP(S) - solace

I would like to connect my Spring Boot application to a Solace PubSub+ instance using the following URL amqps://localhost:5671. I would like to use Spring Cloud Stream and Solace Spring Cloud Stream Binder for that.
I tried the following configuration in my application.yml:
solace:
java:
host: amqps://localhost:5671
clientUsername: admin
clientPassword: admin
But this does not work. I keep getting errors that amqps is not a valid scheme. Same goes for plain amqp:// URIs.
I have dug a little deeper into the code of Solace Spring Cloud Stream Binder, and I am not sure this is actually possible at all. It seems the configuration above only works for tcp:// and tcps:// URIs, both resulting in messages being sent over Solace's proprietary SMF protocol.
This works:
solace:
java:
host: tcp://localhost:55555
clientUsername: admin
clientPassword: admin
... but does not use AMQP but SMF.
How can I configure Solace Spring Cloud Stream Binder to communicate via AMQP and AMQPS?

The Spring Cloud Stream binders from Solace do not support AMQP. They are written using the Solace Java API JCSMP and use SMF, which you have observed.
I am not sure if there is a community SCS binder using AMQP 1.0. Is there a reason you need it to work in AMQP 1.0?

Related

CORS Spring Cloud Data Flow

How to enable CORS in spring cloud dataflow to make it api accessible from external web app like angular?
Cross Origin Resource Sharing is not supported out of the box in SCDF.
But, Spring Cloud Data Flow server application is a Spring Boot app and can be customized and extended.
You could add global CORS configuration to SCDF custom application. For information on how to do this, you can refer to Spring Boot documentation.
You can also check the sample here on how to customize SCDF server application.

How to migrate netflix zuul 1 to zuul 2 or spring cloud gateway

Our services are currently using spring cloud netflix zuul as our gateway.
Now we have to support websocket so we need to migrate zuul 1 to zuul 2 or spring cloud gateway.
I know spring cloud team is no more supporting zuul as they have their own spring cloud gateway.
I briefly looked into zuul 2.0 and I got to know that we should change filter things first
and there is no more #EnableZuulProxy. (How about Routes configration in application.yml?)
So My question is, is there an reference or simple document to migrate zuul 1.0 to 2.0?
Or we have to rebuild our gateway application?
Any help would be appreciated!
I am looking into this right now myself, probably going to migrate to Spring Cloud Gateway as we're using Spring a lot already. One major thing to watch out for is that both Spring Cloud Gateway and Zuul 2 are using a reactive programming model, with only a couple of threads handling all the requests, which means that if you have any custom code that calls http endpoints or other services, you will have to re-code those pieces in a reactive fashion, or else your threads will block and your gateway won't be able to handle more than a couple requests at a time.
You can read a bit about Spring Webflux (used in Spring Cloud Gateway instead of Spring MVC) and reactive programming here: https://docs.spring.io/spring-framework/docs/current/reference/html/web-reactive.html
And no, I have not found a document that will guide you through a migration. In fact that's how I googled to this StackOverflow question...

Is there a reverse proxy for Solace Message Router?

IBM has MQIPT (IBM MQ Internet Pass-Thru) that acts as MQ forwarder/reverse proxy to implement messaging solutions between remote sites across the internet. Is there such an equivalence for Solace?
Solace has all kinds of fancy advanced features for load balancing and hybrid/multi-site deployments like bridges and dynamic message routing, but I don't really know those, and where's the fun in having everything ready-made and pre-solved for you anyway? :-)
So here I am going to assume you want to roll your own solution and use an actual reverse proxy:
You can switch to HTTP-based protocols, and just use any regular HTTP reverse proxy. Solace message brokers have a REST message interface, or if your application already uses the Solace API for messaging (or needs its advanced features), you can switch over to HTTP streaming or WebSockets as a transport by modifying the scheme portion of the broker URL in your application configuration. (http:// or ws:// instead of tcp://) This will only allow you to balance sessions, not individual messages within a single elephant flow.

What benefits does Spring AMQP have over Spring Cloud Stream for Microservices Architecture

I use Spring Cloud approach for building few microservices which supposed to interact with each other. For messaging between microservices I intended to use RabbitMQ and Spring AMQP, but after I looked at Spring Cloud Stream I feel lost. In my mind Spring Cloud Stream is next level of abstraction (probably too strong, but you should get overall impression) with many very useful features. So I wonder why would someone use Spring AMQP for new development? Could you please provide any Spring AMQP benefits over Spring Cloud Stream for pretty basic case when one microservice sends message to another microservice and receives reply?
Thanks.
Spring Cloud Stream provides an opinionated configuration model that connects to the external system (Binder, Consumer Group etc.,). This is mainly intended for Streaming applications where the applications are connected via pipeline. The applications that don't fit this opinionated model can be configured directly from Spring Integration (+ Spring AMQP).
For instance, Spring Cloud Stream doesn't provide direct support for request/reply scenarios for example. You can read this SO question and the github issue here

Use oauth2 authentication for the main app and basic auth for the management endpoints in spring boot?

I'm using Spring Boot to build a REST Api which I can secure with Oauth2 (using spring-security-oauth2).
I want to manage a separate authentication and authorization schema for the actuator management endpoints (metrics, health, etc.).
And I want the management endpoints to run on a different port (management.port=8081 in application.properties)
I've been reading quite a lot but couldn't find a way to do it.
Thanks
That's because you can't separate endpoints by port. If the actuator management endpoints and the management endpoints are on the same component, the Spring Boot container (Tomcat) will launch that whole component on one port.
What you are saying can maybe be achieved by a proxy. You would map some urls on the proxy to internally correspond with the urls on your component.

Resources