npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

test-kafka

v1.0.0

Published

test steveo

Downloads

15

Readme

Example app for testing Steveo

It creates a docker app which is using a node application (with running kafka).

Build docker container

  • Run docker-compose build app
  • Run docker-compose up app

Kafka Engine

Connect to container

  • Run docker-compose run app bash

Start kafka producer

root@57f35557fe6b:/usr/src/app# ENGINE=kafka node producer.js

Start Consumer

root@83df25a76b71:/usr/src/app# ENGINE=kafka node consumer.js
initializing consumer [ 'test-topic' ]

You should start seeing messages flowing

SQS Backend

Connect to container

  • Run docker-compose run app bash

Start sqs producer

root@57f35557fe6b:/usr/src/app# ENGINE=sqs node producer.js
Produce: Message  1
SQS Publish Data { ResponseMetadata: { RequestId: 'd14d6482-950d-5836-91ff-354e6c715720' },
  MD5OfMessageBody: 'ebae47e466456b6dad60cfc8d04bc510',
  MD5OfMessageAttributes: '52b3d132bbd04ee6322882f3e2ee4003',
  MessageId: '83b29ebc-2c9d-466b-8d35-afb3d1ff2ec6' }

Start Consumer

root@83df25a76b71:/usr/src/app# ENGINE=sqs AWS_ACCESS_KEY=AKAISOMETHING AWS_SECRET_ACCESS_KEY=reallylongs3cr3tk3y node consumer.js

initializing consumer [ 'test-topic' ]
queueURL for topic test-topic is https://sqs.ap-southeast-2.amazonaws.com/hahhahahaha/test-topic
initializing consumer test-topic { MaxNumberOfMessages: 1,
  QueueUrl: 'https://sqs.ap-southeast-2.amazonaws.com/againhahhaha/test-topic',
  VisibilityTimeout: 180,
  WaitTimeSeconds: 20 }
Deleting message test-topic { payload: 'Message 1', timestamp: 1498609468761 }
Start subscribe test-topic { payload: 'Message 1', timestamp: 1498609468761 }
Payload from producer { payload: 'Message 1', timestamp: 1498609468761 }

Redis Backend

Connect to container

  • Run docker-compose run app bash

Start redis producer

root@57f35557fe6b:/usr/src/app# ENGINE=redis node producer.js
Produce: Message  1
Redis Publish Data { qname: 'test-topic',
  message: '{"payload":"Message 1","timestamp":1498647318149}',
  delay: 0 } id er852naugvE35vCeVSqCSbx89BVogTW3
Queue status { vt: 20,
  delay: 0,
  maxsize: 1024,
  totalrecv: 426,
  totalsent: 427,
  created: 1498632439,
  modified: 1498632439,
  msgs: 1,
  hiddenmsgs: 1 }

Start Consumer

root@83df25a76b71:/usr/src/app# ENGINE=redis node consumer.js

initializing consumer [ 'test-topic' ]
initializing consumer test-topic
Message from redis { id: 'er85888ojiiTFUHNHkjSGTdH2KTGUsJq',
  message: '{"payload":"Message 1","timestamp":1498647655650}',
  rc: 1,
  fr: 1498647660359,
  sent: 1498647655654 }
Deleting message test-topic { payload: 'Message 1', timestamp: 1498647655650 }
Start subscribe test-topic { payload: 'Message 1', timestamp: 1498647655650 }
Payload from producer { payload: 'Message 1', timestamp: 1498647655650 }
Message from redis { id: 'er8588v18wSjAYFLKBZmguioX9ZNwsgR',
  message: '{"payload":"Message 2","timestamp":1498647656692}',
  rc: 1,
  fr: 1498647660380,
  sent: 1498647656697 }