All Downloads are FREE. Search and download functionalities are using the official Maven repository.

jadex.micro.examples.messagequeue.IMessageQueueService Maven / Gradle / Ivy

Go to download

The Jadex micro applications package contains several example applications, benchmarks and testcases using micro agents.

There is a newer version: 4.0.267
Show newest version
package jadex.micro.examples.messagequeue;

import jadex.commons.future.IFuture;
import jadex.commons.future.ISubscriptionIntermediateFuture;

/**
 *  Message queue interface. Allows for subscribing to topics
 *  and publishing events to the queue.
 */
public interface IMessageQueueService
{
	/**
	 *  Subscribe to a specific topic. New events that fit to the topic
	 *  are forwarded to all subscribers as intermediate results.
	 *  A subscribe can unsubscribe by terminating the future.
	 *  @param topic The topic.
	 *  @return The events.
	 */
//	@Timeout(Timeout.NONE)
	public ISubscriptionIntermediateFuture subscribe(String topic);
	
	/**
	 *  Publish a new event to the queue.
	 *  @param topic The topic.
	 *  @param event The event to publish.
	 */
	public IFuture publish(String topic, Event event);

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy