Tracardi / tracardi

TRACARDI is a new HOME for your customer data. TRACARDI is an Composable API-first solution for any company that need inexpensive CDP to intergrate with.
https://www.tracardi.com
Other
519 stars 95 forks source link

Create a documentation for production ready Apache Pulsar on k8s #821

Closed atompie closed 4 weeks ago

atompie commented 1 year ago

Is your feature request related to a problem? Please describe. We have a set of instructions for installing Apache Pulsar on Kubernetes (k8s). We need to confirm if these instructions work as expected. If they don't, we'll make adjustments and test to ensure they do.

Describe the solution you'd like We need someone with dev-ops skills to try to install Apache Pulsar on k8s and see if the docs that are at https://github.com/Tracardi/tracardi-api/blob/0.8.2-dev/docs/installation/pulsar/pulsar_k8s_apache_helm.md actually work.

The installed Apache Pulsar should be protected by the Pulsar token.

use this code to connect and test.

Publisher


import pulsar

client = pulsar.Client( 'pulsar://<host>:6650',  authentication=pulsar.AuthenticationToken(<token>))

producer = client.create_producer('persistent://public/default/topic')

for i in range(10):
    producer.send(('Hello-%d' % i).encode('utf-8'))

client.close()

Consumer

import pulsar

client = pulsar.Client(
    'pulsar://<host>:6650',
    authentication=pulsar.AuthenticationToken(<token> )
)

consumer = client.subscribe('persistent://public/default/topic', 'my-subscription')

while True:
    msg = consumer.receive()
    try:
        print("Received message '{}' id='{}'".format(msg.data(), msg.message_id()))
        # Acknowledge successful processing of the message
        consumer.acknowledge(msg)
    except Exception:
        # Message failed to be processed
        consumer.negative_acknowledge(msg)

client.close()
Tejoooo commented 1 year ago

@atompie I m willing to contribute on this can u assign me this issue

atompie commented 4 weeks ago

Done