Spring Cloud Stream · Example Payload

Spring Cloud Stream Kafka Binding Example

Example Spring Cloud Stream configuration for connecting to Apache Kafka with consumer group and partitioning

Apache KafkaAsyncAPIEvent-DrivenJavaMessagingMicroservicesRabbitMQSpring FrameworkStream Processing

Spring Cloud Stream Kafka Binding Example is an example object payload from Spring Cloud Stream, with 5 top-level fields. It illustrates the shape of data this provider's APIs accept or return.

Top-level fields

namedescriptionformatconfigurationjavaImplementation

Example Payload

spring-cloud-stream-kafka-binding-example.json Raw ↑
{
  "name": "Kafka Binder Configuration Example",
  "description": "Example Spring Cloud Stream configuration for connecting to Apache Kafka with consumer group and partitioning",
  "format": "application.yml",
  "configuration": {
    "spring": {
      "cloud": {
        "stream": {
          "function": {
            "definition": "processOrder;auditEvent"
          },
          "bindings": {
            "processOrder-in-0": {
              "destination": "orders",
              "group": "order-processing-service",
              "consumer": {
                "concurrency": 3,
                "maxAttempts": 3,
                "backOffInitialInterval": 1000,
                "backOffMaxInterval": 10000
              }
            },
            "processOrder-out-0": {
              "destination": "processed-orders",
              "producer": {
                "partitionKeyExpression": "payload.customerId",
                "partitionCount": 8
              }
            },
            "auditEvent-in-0": {
              "destination": "audit-events",
              "group": "audit-consumer"
            }
          },
          "kafka": {
            "binder": {
              "brokers": ["kafka-broker-1:9092", "kafka-broker-2:9092"],
              "replicationFactor": 3,
              "autoCreateTopics": true
            }
          }
        }
      }
    }
  },
  "javaImplementation": {
    "processOrder": "@Bean\npublic Function<Order, ProcessedOrder> processOrder() {\n    return order -> {\n        // Process the order\n        return new ProcessedOrder(order.getId(), \"PROCESSED\");\n    };\n}",
    "auditEvent": "@Bean\npublic Consumer<AuditEvent> auditEvent() {\n    return event -> {\n        auditRepository.save(event);\n    };\n}"
  }
}

Work with this as data

Every example here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for examples

4 MCP tools reach this
  • find_examplesBrowse and filter every example in the catalog.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools

Call it yourself

curl for this page
This example
curl "https://apis.io/api/v1/examples/spring-cloud-stream-kafka-binding-example"
All examples
curl "https://apis.io/api/v1/examples?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no email required.

A second provider on the same verified email joins the account you already have.