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.2.2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | f07befab5624973bc824ed9d025739edb1fd4154c89bd053b5c362f8d38d89fe |
|
MD5 | 4e65c685ff2b77c1efb04132ba3bbc2b |
|
BLAKE2b-256 | 9510993d06678a6f5b7bc12ebe5bd56d6ecc4b11efed5df11f726ad35bfc1b13 |
Close
Hashes for streamsx.eventstreams-1.2.2-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 92e7f28a44501a4c802fc8a96660668cedfb189c696352e422649dc838ee722e |
|
MD5 | a6f66862a33b60630b68a30f478ff9b0 |
|
BLAKE2b-256 | ff8cf19b3e49aad16710fc2eed62366c852fbe0619f02ad690c7cd9497ccbd57 |