Call Rest service from Spring Integration without invoking from MVC container - spring-integration

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.

Related

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

External Service Request Response Logging in 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.

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.

Ftp Polling as service in Spring Integeration

In my application.I need to poll files from FTP Server.But the current load will be very less say per day we will get 2-3 files.so i don't want my service to run always and uses the resources.
Is there any in build or with little customization can i start/stop my FTP polling on demand.
Basically i want this FTP polling as service in UNIX. so that when required stop/start.
Am using Spring Integration's int-ftp:inbound-channel-adapter
Not sure if it is an issue to keep Object in the Java Heap and don't affect GC...
If you have such a low polling interval you can use cron option on the <poller> to run the polling task once-twice a day.
From other side you can, of course, start/stop any Spring Integration Endpoint using its id and Lifecycle start/stop management operations.
In addition you can expose your endpoint to the JMX and start/stop them from there, or just rely on the Control Bus in your app to do the same.

Resources