Return to site

🍃🚀 SPRING INTEGRATION 7.2.0 in 3️⃣ code snippets

Smarter messaging, safer integrations and fewer plugins!

· spring

🔸 TL;DR

Released on November 19, 2026, Spring Integration 7.2.0 introduces Kafka queues, HiveMQ support, native RabbitMQ delayed delivery, payload validation and stronger deserialization security, while addressing 12 CVEs.

🔸 1️⃣ 📨 KAFKA SHARE GROUPS

Multiple consumers can process individual records from the same partition, enabling queue-like workloads instead of exclusive partition assignment.

@Bean
IntegrationFlow ordersFlow(
    ShareConsumerFactory<String, String> factory) {
  return IntegrationFlow
    .from(Kafka.shareMessageDrivenChannelAdapter(
        factory, "orders"))
    .channel("orderProcessing")
    .get();
}

#Kafka #Messaging

---

🔸 2️⃣ 🛡️ PAYLOAD VALIDATION

The new PayloadValidatingMessageSelector uses a Spring Validator to filter invalid payloads before they reach business logic.💯🆒

@Bean
IntegrationFlow validationFlow(Validator validator) {
  return IntegrationFlow
    .from("incomingOrders")
    .filter(
      new PayloadValidatingMessageSelector(validator),
      f -> f.discardChannel("invalidOrders"))
    .channel("validOrders")
    .get();
}

#Validation #DataIntegrity

---

🔸 3️⃣ ⏳ NATIVE DELAYED DELIVERY

RabbitMQ 4.4 supports native delayed messages on quorum queues without requiring the delayed message exchange plugin.

IntegrationFlow delayedOrders(AmqpTemplate template) {
  return IntegrationFlow
    .from("orders")
    .handle(Amqp.outboundAdapter(template)
      .routingKey("orders.delayed")
      .deliveryTimeExpression(
        m -> Instant.now().plusSeconds(60)))
    .get();
}

#RabbitMQ #AMQP

---

🔸 OTHER FEATURES

▪️ HiveMQ-based MQTT client module.

▪️ Paho MQTT deprecated for removal.

▪️ Secure-by-default deserialization with addAllowedPatterns() for custom types.

▪️ RestTemplate deprecated for HTTP outbound configuration in favor of RestClient.

▪️ FTP proxy support.

▪️ Apache Derby support deprecated.

▪️ Dependency upgrades.

🔸 SECURITY

12 CVEs addressed, including unsafe deserialization, path traversal, command injection and memory exhaustion.

Security fixes are also available in 7.1.3 and 7.0.8.

🔸 TAKEAWAYS

▪️ Kafka embraces queue-based workloads.

▪️ Validate messages before processing.

▪️ Schedule RabbitMQ messages natively.

▪️ Prepare your migrations and prioritize security upgrades.

#Java #Spring #SpringIntegration #Microservices #CyberSecurity #EventDrivenArchitecture

📘Fullstack Dev 2027 for Java Tech👉 https://a.co/d/0crUwEQ6