Giter Club home page Giter Club logo

cherami-client-java's Introduction

Cherami Client for JVM

(This project is deprecated and not maintained.)

Java client library for publishing/consuming messages to/from Cherami.

Build Status Coverage Status License: MIT

Using cherami-client-java

The cherami-client-java library supports publishing/consuming from Cherami in synchronous and asynchronous modes. The usage below uses the synchronous blocking API.

 // Create the client object with the server ip and port
 CheramiClient client = new CheramiClient.Builder(serverIP, serverPort).build();
 
 // Create a destination for publishing messages to
 CreateDestinationRequest dstRequest = new CreateDestinationRequest();
 dstRequest.setPath(destinationPath);
 client.createDestination(dstRequest);
 
 // Create a consumer group for consuming messages from the destination
 CreateConsumerGroupRequest cgRequest = new CreateConsumerGroupRequest();
 cgRequest.setDestinationPath(destinationPath);
 cgRequest.setConsumerGroupName(consumerGroupName);
 client.createConsumerGroup(cgRequest);
 
 // Publish a message
 CreatePublisherRequest pRequest = new CreatePublisherRequest.Builder(destinationPath).build()
 CheramiPublisher publisher = client.createPublisher(pRequest);
 publisher.open();
 publisher.write(new PublisherMessage("hello".getBytes("UTF8")));
 publisher.close();
 
 // Consume a message
 CreateConsumerRequest cRequest = new CreateConsumerRequest.Builder(destinationPath, consumerGroupName).build()
 CheramiConsumer consumer = client.createConsumer(cRequest);
 consumer.open();
 CheramiDelivery delivery = consumer.read();
 System.out.println(new String(delivery.getMessage().getPayload().getData(), "UTF8"));
 consumer.close();
 
 client.close();

For details on how to use the library in an application, see the examples directory.

Development

Build with mvn clean package

Contributing to Cherami

If you are interested in contributing to cherami the best place to start would be this blog post eng.uber.com/cherami

Note: All contributors also need to fill out the Uber Contributor License Agreement before we can merge in any of your changes.

Documentation

eng.uber.com/cherami

License

MIT License, please see LICENSE for details.

cherami-client-java's People

Contributors

venkat1109 avatar ziyili66 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cherami-client-java's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.