create stream based upon $by_event_type

It almost looks like it is incorrectly parsing the:

fromStreams("$et-FakeEvent1", “$et-FakeEvent2”)

As the position & last check point shows:

$: -1;
e: -1;

t: -1;

-: -1;

F: -1;

k: -1;

e: -1;

E: -1;

v: -1;

n: -1;

1: -1;

Hi Ryan,

fromStreams takes an array of stream names. We’ll likely support multiple arguments as well, but for now you need to write

fromStreams([“a”, “b”])

-yuriy

ok the following change got me a step further…

fromStreams(["$et-FakeEvent1", “$et-FakeEvent2”])
.whenAny(function(s,e) {
linkTo(‘fakeStream’, e);
});

Getting this error: ‘emit’ is not allowed by the projection/configuration/mode

After making the change…

I have Emit Enabled on the projection.

What is triggering this error?

Thanks,

Ryan

Ryan,

Can you open stream browser and extract the last event in the $projections-{your-projection-name} stream?

I cannot see from code why it would prevent you from emitting events.

-yuriy

{
“handlerType”: “JS”,
“query”: “\r\n// Projection Used to create Events\r\n// Pulled from http://geteventstore.com/blog/20130210/the-cost-of-creating-a-stream/\r\n// Name: buildEventTypeStreams\r\noptions({\r\n // stateStreamName: null, \t\t// overrides output stream StateUpdated events are emitted to\r\n\t\t\t\t\t\t\t\t\t\t// NOTE: use {0} placeholder in case of a partitioned projection\r\n\tuseEventIndexes: false,\t\t\t\t// makes a fromAll() projection to use event indexes \r\n\t\t\t\t\t\t\t\t\t\t// NOTE: $by_event_type standard projection should be enabled\r\n reorderEvents: false,\t\t\t\t// enables event reordering in a multi-stream projection\r\n\t\t\t\t\t\t\t\t\t\t// event reordering atempts to feed the projection with events in a \r\n\t\t\t\t\t\t\t\t\t\t// their natural order\r\n\tprocessingLag: 50,\t\t\t\t\t// processing lag in ms allowing event reordering to happen\r\n});\r\n\r\n\r\nfromStreams([”$et-FakeEvent1", “$et-FakeEvent2”])\r\n.whenAny(function(s,e) {\r\n linkTo(‘fakeStream’, e);\r\n});",
“mode”: 4,
“enabled”: false,
“deleted”: true,
“sourceDefintion”: {
“allEvents”: true,
“allStreams”: false,
“byStream”: false,
“byCustomPartitions”: false,
“categories”: [],
“events”: [],
“streams”: [
“$et-FakeEvent1”,
“$et-FakeEvent2”
],
“options”: {
“useEventIndexes”: false,
“reorderEvents”: false,
“processingLag”: 50,
“emitStateUpdated”: false
}
},
“emitEnabled”: true,
“checkpointsDisabled”: false
}

since it is

"enabled": false,
"emitEnabled": true,

I suspect that you just see old error message (it is stopped/disabled).
Could you try to run it again? do you see any error messages in error
log?

-yuriy

Do you see your error in the -err log file?

“sourceDefintion”: {
“allEvents”: true,
“allStreams”: false,
“byStream”: false,
“byCustomPartitions”: false,
“categories”: [],
“events”: [],
“streams”: [
“$et-FakeEvent1”,
“$et-FakeEvent2”
],
“options”: {
“useEventIndexes”: false,
“reorderEvents”: false,

  "emitStateUpdated": false
}

},
“emitEnabled”: true,
“checkpointsDisabled”: false
}

Do you see your error in the -err log file?

“sourceDefintion”: {
“allEvents”: true,
“allStreams”: false,
“byStream”: false,

"byCustomPartitions": false,
"categories": [],
"events": [],
"streams": [
  "$et-FakeEvent1",
  "$et-FakeEvent2"
],


"options": {
  "useEventIndexes": false,
  "reorderEvents": false,
  "emitStateUpdated": false


}

},
“emitEnabled”: true,
“checkpointsDisabled”: false
}

Sorry I think I sent you the wrong one (I had recreated the projection with a new name):

{
“handlerType”: “JS”,

“query”: “\r\n// Projection Used to create Events\r\n// Pulled from http://geteventstore.com/blog/20130210/the-cost-of-creating-a-stream/\r\n// Name: buildEventTypeStreams\r\noptions({\r\n // stateStreamName: null, // overrides output stream StateUpdated events are emitted to\r\n\t\t\t\t\t\t\t\t\t\t// NOTE: use {0} placeholder in case of a partitioned projection\r\n\tuseEventIndexes: false,\t\t\t\t// makes a fromAll() projection to use event indexes \r\n\t\t\t\t\t\t\t\t\t\t// NOTE: $by_event_type standard projection should be enabled\r\n reorderEvents: false,\t\t\t\t// enables event reordering in a multi-stream projection\r\n\t\t\t\t\t\t\t\t\t\t// event reordering atempts to feed the projection with events in a \r\n\t\t\t\t\t\t\t\t\t\t// their natural order\r\n\tprocessingLag: 0,\t\t\t\t\t// processing lag in ms allowing event reordering to happen\r\n});\r\n\r\n\r\nfromStreams([”$et-FakeEvent1", “$et-FakeEvent2”])\r\n.whenAny(function(s,e) {\r\n linkTo(‘fakeStream’, e);\r\n});",

“mode”: 4,
“enabled”: true,
“deleted”: false,“processingLag”: 0,On Tuesday, February 12, 2013 9:43:02 AM UTC-7, Yuriy wrote:

“enabled”: false,

since it is

“enabled”: false,

“emitEnabled”: true,

I suspect that you just see old error message (it is stopped/disabled). Could you try to run it again? do you see any error messages in error log?

-yuriy


Yuriy Solodkyy
(y.sol...@gmail.com)

You received this message because you are subscribed to the Google Groups “Event Store” group.

To unsubscribe from this group and stop receiving emails from it, send an email to event-store...@googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.


Yuriy Solodkyy
(y.sol...@gmail.com)

Sorry I think I sent you the wrong one (I had recreated the projection with a new name):

{
“handlerType”: “JS”,
“query”: “\r\n// Projection Used to create Events\r\n// Pulled from http://geteventstore.com/blog/20130210/the-cost-of-creating-a-stream/\r\n// Name: buildEventTypeStreams\r\noptions({\r\n // stateStreamName: null, // overrides output stream StateUpdated events are emitted to\r\n\t\t\t\t\t\t\t\t\t\t// NOTE: use {0} placeholder in case of a partitioned projection\r\n\tuseEventIndexes: false,\t\t\t\t// makes a fromAll() projection to use event indexes \r\n\t\t\t\t\t\t\t\t\t\t// NOTE: $by_event_type standard projection should be enabled\r\n reorderEvents: false,\t\t\t\t// enables event reordering in a multi-stream projection\r\n\t\t\t\t\t\t\t\t\t\t// event reordering atempts to feed the projection with events in a \r\n\t\t\t\t\t\t\t\t\t\t// their natural order\r\n\tprocessingLag: 0,\t\t\t\t\t// processing lag in ms allowing event reordering to happen\r\n});\r\n\r\n\r\nfromStreams([”$et-FakeEvent1", “$et-FakeEvent2”])\r\n.whenAny(function(s,e) {\r\n linkTo(‘fakeStream’, e);\r\n});",
“mode”: 4,
“enabled”: true,
“deleted”: false,“processingLag”: 0,

Did you artached anything to thus message?

I have updated the blog post to use the array version. Sorry about
that, I thought we had already supported the overload.

It will be in master shortly (dev faster).

Cheers,

Greg

Google Groups is giving me issues when I am attaching files. (An error (#340) occurred while communicating with the server.)

I have put them on skydrive instead:

http://sdrv.ms/YXkkAr

Ryan

I reproduced the problem. looking into the problem

Ryan,

the problem is with our old limitation that the multi-stream projections cannot emit any events except state changes. This limitation is almost irrelevant now and it will be removed completely soon.

The following code will work and it does the same. (including reading $et-FakeEventN streams)

options({ useEventIndexes: true});

function linkIt(s, e) {

linkTo(“fakeStream”, e);

}

fromAll()

.when({

FakeEvent1: linkIt,

FakeEvent2: linkIt,

})

The original fromStreams() with linkTo already works for me, but this code is not even pushed to dev branch.

-yuriy

That’s great Yuriy, worked like a charm.

Thanks so much for the help.

Any timeline for next release?

I noticed that the file version number didn’t change between the 1.0.0 (eventstore-net-1.0.0.zip) and 1.0.1 (eventstore-net-1.0.1.zip) downloads… Was that by intention?

Thanks again,

Ryan

Hopefully there will be a new release next week. We will call it
gregs-stag-release or something. But there is actually a lot in dev
and more that can hopefully be put into the release.

BTW. Good luck and congrats with your impending wedding…

Ryan