Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
CAP
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
tsai
CAP
Commits
847a9ecb
Commit
847a9ecb
authored
Jul 16, 2017
by
Savorboard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rename cap attribute routekey
parent
14aada21
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
11 additions
and
11 deletions
+11
-11
CapSubscribeAttribute.cs
src/DotNetCore.CAP.Kafka/CapSubscribeAttribute.cs
+6
-6
KafkaConsumerClient.cs
src/DotNetCore.CAP.Kafka/KafkaConsumerClient.cs
+1
-1
CapSubscribeAttribute.cs
src/DotNetCore.CAP.RabbitMQ/CapSubscribeAttribute.cs
+1
-1
RabbitMQConsumerClient.cs
src/DotNetCore.CAP.RabbitMQ/RabbitMQConsumerClient.cs
+1
-1
TopicAttribute.cs
src/DotNetCore.CAP/Abstractions/TopicAttribute.cs
+2
-2
No files found.
src/DotNetCore.CAP.Kafka/CapSubscribeAttribute.cs
View file @
847a9ecb
...
@@ -4,24 +4,24 @@ namespace DotNetCore.CAP.Kafka
...
@@ -4,24 +4,24 @@ namespace DotNetCore.CAP.Kafka
{
{
public
class
CapSubscribeAttribute
:
TopicAttribute
public
class
CapSubscribeAttribute
:
TopicAttribute
{
{
public
CapSubscribeAttribute
(
string
topicN
ame
)
public
CapSubscribeAttribute
(
string
n
ame
)
:
this
(
topicN
ame
,
0
)
:
this
(
n
ame
,
0
)
{
{
}
}
/// <summary>
/// <summary>
/// Not support
/// Not support
/// </summary>
/// </summary>
public
CapSubscribeAttribute
(
string
topicN
ame
,
int
partition
)
public
CapSubscribeAttribute
(
string
n
ame
,
int
partition
)
:
this
(
topicN
ame
,
partition
,
0
)
:
this
(
n
ame
,
partition
,
0
)
{
{
}
}
/// <summary>
/// <summary>
/// Not support
/// Not support
/// </summary>
/// </summary>
public
CapSubscribeAttribute
(
string
topicN
ame
,
int
partition
,
long
offset
)
public
CapSubscribeAttribute
(
string
n
ame
,
int
partition
,
long
offset
)
:
base
(
topicN
ame
)
:
base
(
n
ame
)
{
{
Offset
=
offset
;
Offset
=
offset
;
Partition
=
partition
;
Partition
=
partition
;
...
...
src/DotNetCore.CAP.Kafka/KafkaConsumerClient.cs
View file @
847a9ecb
...
@@ -73,7 +73,7 @@ namespace DotNetCore.CAP.Kafka
...
@@ -73,7 +73,7 @@ namespace DotNetCore.CAP.Kafka
var
message
=
new
MessageContext
var
message
=
new
MessageContext
{
{
Group
=
_groupId
,
Group
=
_groupId
,
Key
Name
=
e
.
Topic
,
Name
=
e
.
Topic
,
Content
=
e
.
Value
Content
=
e
.
Value
};
};
MessageReceieved
?.
Invoke
(
sender
,
message
);
MessageReceieved
?.
Invoke
(
sender
,
message
);
...
...
src/DotNetCore.CAP.RabbitMQ/CapSubscribeAttribute.cs
View file @
847a9ecb
...
@@ -4,7 +4,7 @@ namespace DotNetCore.CAP.RabbitMQ
...
@@ -4,7 +4,7 @@ namespace DotNetCore.CAP.RabbitMQ
{
{
public
class
CapSubscribeAttribute
:
TopicAttribute
public
class
CapSubscribeAttribute
:
TopicAttribute
{
{
public
CapSubscribeAttribute
(
string
routingKey
)
:
base
(
routingKey
)
public
CapSubscribeAttribute
(
string
name
)
:
base
(
name
)
{
{
}
}
...
...
src/DotNetCore.CAP.RabbitMQ/RabbitMQConsumerClient.cs
View file @
847a9ecb
...
@@ -87,7 +87,7 @@ namespace DotNetCore.CAP.RabbitMQ
...
@@ -87,7 +87,7 @@ namespace DotNetCore.CAP.RabbitMQ
var
message
=
new
MessageContext
var
message
=
new
MessageContext
{
{
Group
=
_queueName
,
Group
=
_queueName
,
Key
Name
=
e
.
RoutingKey
,
Name
=
e
.
RoutingKey
,
Content
=
Encoding
.
UTF8
.
GetString
(
e
.
Body
)
Content
=
Encoding
.
UTF8
.
GetString
(
e
.
Body
)
};
};
MessageReceieved
?.
Invoke
(
sender
,
message
);
MessageReceieved
?.
Invoke
(
sender
,
message
);
...
...
src/DotNetCore.CAP/Abstractions/TopicAttribute.cs
View file @
847a9ecb
...
@@ -8,9 +8,9 @@ namespace DotNetCore.CAP.Abstractions
...
@@ -8,9 +8,9 @@ namespace DotNetCore.CAP.Abstractions
[
AttributeUsage
(
AttributeTargets
.
Method
|
AttributeTargets
.
Class
,
AllowMultiple
=
true
)]
[
AttributeUsage
(
AttributeTargets
.
Method
|
AttributeTargets
.
Class
,
AllowMultiple
=
true
)]
public
abstract
class
TopicAttribute
:
Attribute
public
abstract
class
TopicAttribute
:
Attribute
{
{
protected
TopicAttribute
(
string
topicN
ame
)
protected
TopicAttribute
(
string
n
ame
)
{
{
Name
=
topicN
ame
;
Name
=
n
ame
;
}
}
/// <summary>
/// <summary>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment