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
b7996be8
Commit
b7996be8
authored
Apr 09, 2018
by
Savorboard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add borkeraddress to connectionpool.
parent
082c6eaf
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
16 additions
and
0 deletions
+16
-0
ConnectionPool.cs
src/DotNetCore.CAP.Kafka/ConnectionPool.cs
+4
-0
IConnectionPool.cs
src/DotNetCore.CAP.Kafka/IConnectionPool.cs
+2
-0
ConnectionChannelPool.cs
src/DotNetCore.CAP.RabbitMQ/ConnectionChannelPool.cs
+6
-0
IConnectionChannelPool.cs
src/DotNetCore.CAP.RabbitMQ/IConnectionChannelPool.cs
+4
-0
No files found.
src/DotNetCore.CAP.Kafka/ConnectionPool.cs
View file @
b7996be8
...
...
@@ -21,8 +21,12 @@ namespace DotNetCore.CAP.Kafka
{
_maxSize
=
options
.
ConnectionPoolSize
;
_activator
=
CreateActivator
(
options
);
ServersAddress
=
options
.
Servers
;
}
public
string
ServersAddress
{
get
;
}
Producer
IConnectionPool
.
Rent
()
{
return
Rent
();
...
...
src/DotNetCore.CAP.Kafka/IConnectionPool.cs
View file @
b7996be8
...
...
@@ -7,6 +7,8 @@ namespace DotNetCore.CAP.Kafka
{
public
interface
IConnectionPool
{
string
ServersAddress
{
get
;
}
Producer
Rent
();
bool
Return
(
Producer
context
);
...
...
src/DotNetCore.CAP.RabbitMQ/ConnectionChannelPool.cs
View file @
b7996be8
...
...
@@ -28,6 +28,8 @@ namespace DotNetCore.CAP.RabbitMQ
_maxSize
=
DefaultPoolSize
;
_connectionActivator
=
CreateConnection
(
options
);
HostAddress
=
options
.
HostName
+
":"
+
options
.
Port
;
Exchange
=
options
.
ExchangeName
;
}
IModel
IConnectionChannelPool
.
Rent
()
...
...
@@ -40,6 +42,10 @@ namespace DotNetCore.CAP.RabbitMQ
return
Return
(
connection
);
}
public
string
HostAddress
{
get
;
}
public
string
Exchange
{
get
;
}
public
IConnection
GetConnection
()
{
if
(
_connection
!=
null
&&
_connection
.
IsOpen
)
...
...
src/DotNetCore.CAP.RabbitMQ/IConnectionChannelPool.cs
View file @
b7996be8
...
...
@@ -7,6 +7,10 @@ namespace DotNetCore.CAP.RabbitMQ
{
public
interface
IConnectionChannelPool
{
string
HostAddress
{
get
;
}
string
Exchange
{
get
;
}
IConnection
GetConnection
();
IModel
Rent
();
...
...
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