Skip to content

valdasraps/esj

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

41 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

esj

Java client for EventStore (http://geteventstore.com)

Build Status Maven Central LGPLv3 License Java Development Kit 1.7

Project website

About

Event Store Java client. Designed to help Java programs easily communicate with Event Store database.

Functionality

Java client functionality:

  • Append event to stream
  • Read from stream
  • Subscribe to stream
  • Delete stream
  • Read events from stream

Code example

Append to stream example:


import lt.emasina.esj.EventStore;
import lt.emasina.esj.model.Message;
...
EventStore es = new EventStore(InetAddress.getByName(HOSTNAME), PORTNUMBER);
...
es.appendToStream(STREAM_NAME, new ResponseReceiver() {
	@Override
	public void onResponseReturn(Message msg) {
		// do something
	},
	@Override
	public void onErrorReturn(Exception ex){
		// do something
	}
},EVENT);
...
es.close();

or in Java 7 manner:


import lt.emasina.esj.EventStore;
import lt.emasina.esj.model.Message;
...
try (EventStore es = new EventStore(InetAddress.getByName(HOSTNAME), PORTNUMBER)) {
    ...
    es.appendToStream(STREAM_NAME, new ResponseReceiver() {
	@Override
	public void onResponseReturn(Message msg) {
		// do something
	},
	@Override
	public void onErrorReturn(Exception ex){
		// do something
	}
    },EVENT);
    ...
}

About

Java client for EventStore (http://geteventstore.com)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •