Skip to content

Commit

Permalink
Add support for ephemeral topics
Browse files Browse the repository at this point in the history
NSQ now has support for ephemeral topics in addition to ephemeral channels.
This change changes the regex to match that change.
nsqio/nsq#305
  • Loading branch information
Matti Savolainen committed Mar 11, 2015
1 parent badb32b commit e1a65b1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/connection.js
Original file line number Diff line number Diff line change
Expand Up @@ -489,7 +489,7 @@ function assertValidMessageId(id) {
*/

function assertValidTopic(name) {
var re = /^[\.a-zA-Z0-9_-]+$/;
var re = /^[\.a-zA-Z0-9_-]+(#ephemeral)?$/;
if (name.length && name.length <= 64 && re.test(name)) return;
throw new Error('invalid topic name "' + name + '"');
}
Expand Down

0 comments on commit e1a65b1

Please sign in to comment.