ReacticveMongoTemplate and MongoTemplate (blocking) in same application - spring-data-mongodb

Is configuring ReactiveMongoTemplate and MongoTemplate (blocking) in the same application can cause problems? Or Can we have reactive and non-reactive mongo configuration in the same application ?

Related

Backpressure for REST endpoints with Spring Functional Web Framework

If I understood correctly, HTTP endpoints implemented with Akka Streams apply backpressure to HTTP clients by not reading from the socket used for communicating with the client.
Is this also true for HTTP endpoints implemented with Spring's Functional Web Framework?
If not, how would I signal HTTP clients to slow down?
Yes, Spring 5, with its Web Reactive module, implements the reactive streams spec with Reactor. Supporting backpressure is part of it.
Note that both the annotation-based and the functional flavors use the same infrastructure, only the programming model differs.

How to make qupid consumer exlusive using apache camel?

I am trying to connect single qpid broker via to clients.
I want only one of these two client should listen the qpid queue.
I am trying this with apache camel
I don't believe QPID supports exclusive consumer on queues. An alternative option is to deploy your Camel route in Karaf in a primary+failover setup. The failover karaf container will be running in a "warm" mode where the Camel route is not started. If the primary fails, the failover will take over and start up all Camel routes. Works great for Highly Available database and file pollers as well!
ref: Karaf HA / Cluster setup

Is there a way to programmatically find the available CamelContext

I am running Camel inside PlayFramework and it all works pretty well but when the Play server is running in development mode it does dynamically class reloading but it starts a new Camel context each time.
I can hook into Play restart and shut down the Camel context by calling stop() on the CamelContext but I would prefer to be able to check if there is already a context running and if so just use that.
This must be possible as hawtio shows me a list of the camel contexts.
I don't use spring to configure camel.
You can use JMX to see what other CamelContext's are in the JVM mbean server. This is what hawtio uses to detect which Camel's are running in the JVM.
As alternative you may fiddle with Container spi to have events when a CamelContext is created. But this requires a way to hook into this: https://github.com/apache/camel/blob/master/camel-core/src/main/java/org/apache/camel/spi/Container.java

Suggested lifecycle for SSRS web proxy

I make use of the SQL Server Reporting Service's web services api to render reports using the ReportExecutionService proxy in an asp.net web application.
My question is: should I be creating a new instance of the ReportExecutionService proxy each time I generate a report, or is using a singleton instance the recommended approach? (eg. for performance reasons, etc).
What wcf bindings you are going to use? In general - you can reuse proxy, and in single-user single thread application it is a good idea.
But singleton is a bad idea in ASP.NET application - by itself proxies are not thread-safe.
Therefore, you can create proxy and cache it on session layer (is one session = one thread, as I remember this is configurable in ASP.NET).

jax-rs, active mq integration

Can anyone give me a sample source code where i can use restful jax-rs web service as an interface to message broker using active mq. The requirement is traffic comes to application through jax-rs webservice and the message is transferred to active mq which is processed asynchronously and the consumer on active mq inserts data into db. Can anyone please provide sample code, that would be great
The question is very fuzzy. There are multiple concerns to take into account when doing this kind of interfaces as jax-rs is a http interface (synchronous, non transcational, non persistent, non guaranteed delivery) while activemq (jms) is the other way around, asynchronous, transactional and persistent.
I suggest you take a look at Apache Camel which is a lightweight integration framework that works really good with ActiveMQ. It supports JAX-RS as well. There are multiple code examples over at the Camel website and connecting rest with activemq is rather easy given you have your case fully designed.

Resources