External Service Request Response Logging in Spring Integration - spring-integration

Hi I am using spring integration to call 6 webservices.I have below implementation.
1.4 Rest service call(Calling rest services using Service Activator).And these service call are made parallely using task executor.
2.2 SOAP services using out bound gate way.I have Interceptor implementation for adding headers.This service calls will be made after above 4 rest call was done.And implemented FaultResolver interface to catch saop Fault.
My question is I want log all the external service request/response for both success and failure scenarios.What is the best approach to achieve this without performance hit in spring integration.

Related

How to dispatch and receive result of an Azure Function from a web application?

What services or patterns are involved when dispatching an asynchronous Azure Function and then waiting for some sort of result on a single-page web application?
Currently, I've got a React web application that submits a request to an HTTP "API server". That API server then kicks off an Azure Function using Service Bus message queue.
At this point, the web application is only aware of the fact that it successfully dispatched a request to start an asynchronous compute.
What kind of services or approaches can I use to inform the browser client that the function has completed? Does Azure have something like this for me to use or should I be storing these execution results in a database and polling for their completion myself?

How to check whether Spring Cloud data flow microservice is up by using Python

Is there a way to check whether Spring Cloud data flow (streams) microservice is up and running by using Python?
I would also want to (un)deploy microservice.
Is it possible?
You can use this REST API guide to understand what REST endpoints you can use to specify operations against Spring Cloud Data Flow (start/stop the stream/task for instance).

Monitoring of dynamic integration flows

I am building the pollers based on the data from the database. Mainly file pollers.
Does Spring integration provide any way to monitor the flows via the spring admin /actuator?
If yes, is there any example?
Well, need to understand what you mean with the monitor.
There is an /integrationgraph since Spring Boot 2.1 endpoint to show all the integration components in the application context as a JSON graph. You have enable it explicitly though: https://docs.spring.io/spring-boot/docs/2.1.0.RELEASE/reference/htmlsingle/#production-ready-endpoints-exposing-endpoints.
There is also an endpoint for metrics to obtain: https://docs.spring.io/spring-boot/docs/2.1.0.RELEASE/reference/htmlsingle/#production-ready-metrics-meter

Is it possible to configure an NServiceBus endpoint (on Azure transport) to accept a simple string as input?

We have an NServiceBus endpoint that monitors an Azure Service Bus Queue (using Azure as a transport). But not all the clients that send messages to the queue are .NET-based.
Can an NServiceBus endpoint be configured to accept a simple string as input?
I've tried intercepting messages with a class that implements IMutateIncomingMessages, but at this point deserialization from the Azure transport has already failed.
I can inspect the message coming in in a class implementing IMutateIncomingTransportMessages, but I'm not sure if this is the right place.
What is the best way to configure NServiceBus to handle a message being published in the following format (keep in mind this can also come via the Java or Node SDKs, or via an Azure REST endpoint):
var brokered = new BrokeredMessage("This plain string represents the data.");
queueClient.Send(brokered);
Deserialization of this message will fail, because it contains a string, not a byte array as expected by the Azure transport deserializer.
PS: I know it is possible to expose the endpoint as a WCF service, but currently we only have NServiceBus.Host processes that pull from the queue and the WCF solution does not feel like the right solution to me.
As mentioned on twitter earlier, but just including it here for completeness...
If you want to integrate natively, then you have to modify parts of the nsb pipeline to accomodate for your environment.
See https://github.com/yvesgoeleven/NServiceBus.AsbNativeIntegration for an example of such an integration.

Call Rest service from Spring Integration without invoking from MVC container

A program fetches the data from database and send to JMS queue using Spring Integration and call the POST rest service.
Now the question is if we use HTTP:INBOUND ADAPTER to call the rest service, we may need to use through the servlet container. But i don't a war file application. I need another feasible approach where we call the REST service from Spring Integration,as my program is a standalone program.
Not at this time; we are looking at various options for a stand-alone ReST solution.

Resources