IBM Streams Event Streams integration
Project description
Overview
Provides functions to read messages from Event Streams as a stream and publish tuples to Event Streams as messages.
IBM® Event Streams is a fully managed, cloud-based messaging service. Built on Apache Kafka, IBM Event Streams is a high-throughput, fault-tolerant, event management platform that helps you build intelligent, responsive, event-driven applications.
Sample
A simple hello world example of a Streams application publishing to a topic and the same application consuming the same topic:
from streamsx.topology.topology import Topology from streamsx.topology.schema import CommonSchema from streamsx.topology.context import submit, ContextTypes import streamsx.eventstreams as eventstreams import time def delay(v): time.sleep(5.0) return True topology = Topology('EventStreamsHelloWorld') to_evstr = topology.source(['Hello', 'World!']) to_evstr = to_evstr.as_string() # delay tuple by tuple to_evstr = to_evstr.filter(delay) # Publish a stream to Event Streams using HELLO topic eventstreams.publish(to_evstr, topic='HELLO') # Subscribe to same topic as a stream from_evstr = eventstreams.subscribe(topology, schema=CommonSchema.String, topic='HELLO') # You'll find the Hello World! in stdout log file: from_evstr.print() # finally submit the topology to a Streaming Analytics Service instance submit(ContextTypes.STREAMING_ANALYTICS_SERVICE, topology)
Documentation
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for streamsx.eventstreams-1.3.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 747f7a63f03fab8fd91b518c7dada6850608683510f388b504f1524ddb3d8b6f |
|
MD5 | 3b2f646c616febb91e52eabfa184b9d5 |
|
BLAKE2b-256 | ebcf386eb8bcb53026fbb32c317e7c58a13e9a4de99e69b4e63234e2132121d3 |
Close
Hashes for streamsx.eventstreams-1.3.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 698182bcb1456f31ace90ccbbe4983c8dd35b0a963a79f69daf74a3dd9528417 |
|
MD5 | 660a7dea3555ed2941e97c7d5c7b2665 |
|
BLAKE2b-256 | 824d105c521547249e2f8fd836568950c4302f1a9fd90e0a92846fddedd5bdff |