appirio-tech/ap-event-lib

Name: ap-event-lib

Owner: Topcoder

Description: Event Framework Library

Created: 2015-03-16 16:20:43.0

Updated: 2016-12-04 06:13:21.0

Pushed: 2015-06-13 02:42:15.0

Homepage: null

Size: 370

Language: Java

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

Appirio Event Framework Library

Appirio Microservices should follow this model for asnychronous notification of events via a raw json payload. This library provides a Java implementation for our standard service stack.

Credentials

Provide AWS credentials in ~/.aws/credentials (where ~ is home directory of user running service)

_IAM_username]
access_key_id = BLAHBLAHBLAH
secret_access_key = blahBlahBlahBlahBlah
Usage
rt com.appirio.event.Topic;
rt com.appirio.event.Publisher;
rt com.appirio.event.Subscriber;

ic class TestModel {
private String testString;
public TestModel() {
}
public TestModel(String testString) {
    this.testString = testString;
}
public String getTestString() {
    return testString;
}


isher pub = new Publisher("PublisherAppName", "TopicName");
criber sub = new Subscriber("PublisherAppName", "TopicName", "SubscriberAppName");

Publish(new TestModel("hello"));

ng json = sub.getMessages()[0];
r
Model testReceived = (TestModel) sub.getItems(TestModel.class)[0];

This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.