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

de.digitalcollections.flusswerk.examples.write.only.Application Maven / Gradle / Ivy

There is a newer version: 3.0.0
Show newest version
package de.digitalcollections.flusswerk.examples.write.only;

import de.digitalcollections.flusswerk.engine.exceptions.WorkflowSetupException;
import de.digitalcollections.flusswerk.engine.messagebroker.MessageBroker;
import de.digitalcollections.flusswerk.engine.messagebroker.MessageBrokerBuilder;
import de.digitalcollections.flusswerk.engine.model.DefaultMessage;
import java.io.IOException;

public class Application {

  private void run() throws IOException {
    MessageBroker messageBroker = new MessageBrokerBuilder()
        .exchange("workflow")
        .writeTo("someOutputQueue")
        .build();

    for (int i=0; i < 10; i++) {
      messageBroker.send(new DefaultMessage(Integer.toString(i)));
    }

  }

  public static void main(String[] args) throws IOException, WorkflowSetupException {
    Application application = new Application();
    application.run();
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy