Sure you can even mark them as being transient and able to be
scavenged later. The competing consumer stuff works exactly like AMQP
(in fact there is even an AMQP adapter under way). In terms of
performance the initial numbers have been very good (faster than
catchup subscriptions). Here is some code I wrote for trying to
reproduce something the other day that can help you get started:
https://github.com/EventStore/EventStore/issues/771
class Program { private static string group = "foo"; private static
string stream = "bar"; static void Main(string[] args) { using (var c
= EventStoreConnection.Create(new IPEndPoint( IPAddress.Loopback,
1113))) { c.ConnectAsync().Wait(); //CreateCompetingGroup(c);
c.ConnectToPersistentSubscription(stream, @group, (sender,e) => {
//resolved event Console.WriteLine("Received " +
e.OriginalEventNumber); }, (sender, reason, exc) => {
Console.WriteLine("error " + reason); }); Thread.Sleep(500); for (var
i = 0; i < 20; i++) { c.AppendToStreamAsync(stream,
ExpectedVersion.Any, new EventData(Guid.NewGuid(), "foo", false, new
byte[100], new byte[100])).Wait(); } Thread.Sleep(5000); } } private
static void CreateCompetingGroup(IEventStoreConnection
eventStoreConnection) {
eventStoreConnection.CreatePersistentSubscriptionAsync(stream, @group,
PersistentSubscriptionSettings
.Create().ResolveLinkTos().StartFromBeginning(), new
UserCredentials("admin", "changeit")).Wait(); }