Skip to content

ddubson/integration-and-messaging

Repository files navigation

Integration and Messaging Projects

Spring Integration

Basic Integration (basic-integration)

./gradlew :spring-integration:basic-integration:bootRun

basic-integration-schema

Pollable Channels

Queue Channel

./gradlew :spring-integration:pollable-channels:queue-channel:bootRun

pollable-queue-channel-schema

Priority Queue Channel

./gradlew :spring-integration:pollable-channels:priority-queue-channel:bootRun

pollable-queue-channel-schema

Subscribable Channels

Direct Channel

./gradlew :spring-integration:subscribable-channels:direct-channel:bootRun

subscribable-queue-channel-schema

Publish-Subscribe Channel

./gradlew :spring-integration:subscribable-channels:pubsub-channel:bootRun

subscribable-queue-channel-schema

Messaging Bridge

./gradlew :spring-integration:subscribable-channels:messaging-bridge:bootRun

Channel Interceptors

./gradlew :spring-integration:subscribable-channels:channel-interceptors:bootRun

Router

Type and Value Routers

Routes based on the type of payload or header value enclosed in Message (Payload Type, Header Value)

Recipient List Router

Routes based on the recipient filter expression, routes to default channel if no match.

Filter

Basic Filter

Custom Filter

Splitters and Aggregators

Basic Splitter

Basic Splitter and Aggregator

Custom Aggregator

Transformers

Basic Transformer

Create a simple transformation inline (SpEL expression based)

Custom Transformer

Custom transform function based on an external service

Filtering Headers

Filter headers for each message on a message channel

Header Enricher

Add headers for each message on a message channel

Payload Enricher

Add more data per each message on a channel

Processing Endpoints

Gateways

Gateways can take in raw POJOs and process them.

Service Activators

Service Activators are endpoints at which data is handled or proxied.

Inbound/Outbound Channel Adapters

Inbound adapters receive information from external systems, outbound adapters push data to external systems.

File System Integrations

Reading Files

Reading from file system

./gradlew :spring-integration:file-system-integration:reading-files:bootRun

Writing Files

Writing files to the file system

./gradlew :spring-integration:file-system-integration:writing-files:bootRun

Transforming Files

./gradlew :spring-integration:file-system-integration:transforming-files:bootRun

Outbound Gateway

./gradlew :spring-integration:file-system-integration:outbound-file-gateway:bootRun

FTP Integrations

Inbound Channel Adapters

Outbound Channel Adapters

Outbound Gateways

JDBC Integrations

Inbound Channel Adapter

./gradlew :spring-integration:jdbc-integration:inbound-channel-adapter:bootRun

Outbound Channel Adapter

./gradlew :spring-integration:jdbc-integration:outbound-channel-adapter:bootRun

Outbound Gateway

./gradlew :spring-integration:jdbc-integration:outbound-gateway:bootRun

File Transfer Pattern Project (file-transfer-pattern)

Flow

  1. Run FTPUploader and create a sample file in target/upload
  2. Uploader will upload to FTP server
  3. Run FTPDownloader, which will download the sample file to target/download

Note: Make sure the home directory on FTP server, the user has create/delete permissions on directories.

Spring AMQP - RabbitMQ Project (spring-amqp-rabbitmq)

Running

Start RabbitMQ by running rabbitmq-server command on macOS

Spring JMS (spring-jms-simple)

Must have activemq installed.

MacOS: brew install activemq

Start activemq via activemq start