Skip to content

Commit 7d1db2c

Browse files
committed
refactor/removed "kafka" from documents
1 parent 76fd73f commit 7d1db2c

25 files changed

+41
-307
lines changed

obp-api/src/main/scala/code/api/OBPRestHelper.scala

+1-1
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ trait OBPRestHelper extends RestHelper with MdcLoggable {
246246
# }
247247
# When is enabled we show all messages in a chain. For instance:
248248
# {
249-
# "error": "OBP-30001: Bank not found. Please specify a valid value for BANK_ID. <- Full(Kafka_TimeoutExceptionjava.util.concurrent.TimeoutException: The stream has not been completed in 1550 milliseconds.)"
249+
# "error": "OBP-30001: Bank not found. Please specify a valid value for BANK_ID. <- Full(TimeoutExceptionjava.util.concurrent.TimeoutException: The stream has not been completed in 1550 milliseconds.)"
250250
# }
251251
*/
252252
implicit def jsonResponseBoxToJsonResponse(box: Box[JsonResponse]): JsonResponse = {

obp-api/src/main/scala/code/api/ResourceDocs1_4_0/SwaggerDefinitionsJSON.scala

+2-2
Original file line numberDiff line numberDiff line change
@@ -618,7 +618,7 @@ object SwaggerDefinitionsJSON {
618618

619619
val messageDocJson = MessageDocJson(
620620
process = "getAccounts",
621-
message_format = "KafkaV2017",
621+
message_format = "rest_vMar2019",
622622
inbound_topic = Some("from.obp.api.1.to.adapter.mf.caseclass.OutboundGetAccounts"),
623623
outbound_topic = Some("to.obp.api.1.caseclass.OutboundGetAccounts"),
624624
description = "get Banks",
@@ -4020,7 +4020,7 @@ object SwaggerDefinitionsJSON {
40204020
user_auth_contexts = List(userAuthContextJson)
40214021
)
40224022

4023-
val obpApiLoopbackJson = ObpApiLoopbackJson("kafka_vSept2018","f0acd4be14cdcb94be3433ec95c1ad65228812a0","10 ms")
4023+
val obpApiLoopbackJson = ObpApiLoopbackJson("rest_vMar2019","f0acd4be14cdcb94be3433ec95c1ad65228812a0","10 ms")
40244024

40254025
val refresUserJson = RefreshUserJson("10 ms")
40264026

obp-api/src/main/scala/code/api/util/APIUtil.scala

-2
Original file line numberDiff line numberDiff line change
@@ -2057,7 +2057,6 @@ object APIUtil extends MdcLoggable with CustomJsonFormats{
20572057
Glossary.glossaryItems.toList.sortBy(_.title)
20582058
}
20592059

2060-
// Used to document the KafkaMessage calls
20612060
case class MessageDoc(
20622061
process: String,
20632062
messageFormat: String,
@@ -3405,7 +3404,6 @@ object APIUtil extends MdcLoggable with CustomJsonFormats{
34053404

34063405
/**
34073406
* This method is used for cache in connector level.
3408-
* eg: KafkaMappedConnector_vJune2017.bankTTL
34093407
* The default cache time unit is second.
34103408
*/
34113409
def getSecondsCache(cacheType: String) : Int = {

obp-api/src/main/scala/code/api/util/DynamicUtil.scala

-1
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,6 @@ object DynamicUtil extends MdcLoggable{
256256
|import code.api.dynamic.endpoint.helper.MockResponseHolder
257257
|import code.bankconnectors._
258258
|import code.customer.internalMapping.MappedCustomerIdMappingProvider
259-
|import code.kafka.KafkaHelper
260259
|import code.model.dataAccess.internalMapping.MappedAccountIdMappingProvider
261260
|import code.util.AkkaHttpClient._
262261
|import code.util.Helper.MdcLoggable

obp-api/src/main/scala/code/api/util/ErrorMessages.scala

-7
Original file line numberDiff line numberDiff line change
@@ -681,21 +681,15 @@ object ErrorMessages {
681681
// Exceptions (OBP-50XXX)
682682
val UnknownError = "OBP-50000: Unknown Error."
683683
val FutureTimeoutException = "OBP-50001: Future Timeout Exception."
684-
val KafkaMessageClassCastException = "OBP-50002: Kafka Response Message Class Cast Exception."
685684
val AdapterOrCoreBankingSystemException = "OBP-50003: Adapter Or Core Banking System Exception. Failed to get a valid response from the south side Adapter or Core Banking System."
686685
// This error may not be shown to user, just for debugging.
687686
val CurrentUserNotFoundException = "OBP-50004: Method (AuthUser.getCurrentUser) can not find the current user in the current context!"
688687
val AnUnspecifiedOrInternalErrorOccurred = "OBP-50005: An unspecified or internal error occurred."
689-
val KafkaInterruptedException = "OBP-50006: Kafka interrupted exception."
690-
val KafkaExecutionException = "OBP-50007: Kafka execution exception."
691-
val KafkaStreamTimeoutException = "OBP-50008: Akka Kafka stream timeout exception."
692-
val KafkaUnknownError = "OBP-50009: Kafka Unknown Error."
693688
val ScalaEmptyBoxToLiftweb = "OBP-50010: Scala return Empty box to Liftweb."
694689
val NoCallContext = "OBP-50012: Can not get the CallContext object here."
695690
val UnspecifiedCbsError = "OBP-50013: The Core Banking System returned an unspecified error or response."
696691
val RefreshUserError = "OBP-50014: Can not refresh User."
697692
val InternalServerError = "OBP-50015: The server encountered an unexpected condition which prevented it from fulfilling the request."
698-
val KafkaServerUnavailable = "OBP-50016: The kafka server is unavailable."
699693
val NotAllowedEndpoint = "OBP-50017: The endpoint is forbidden at this API instance."
700694
val UnderConstructionError = "OBP-50018: Under Construction Error."
701695
val DatabaseConnectionClosedError = "OBP-50019: Cannot connect to the OBP database."
@@ -726,7 +720,6 @@ object ErrorMessages {
726720
val InvalidConnectorResponseForGetStatus = "OBP-50222: Connector method getStatus did not return the data we requested."
727721

728722
// Adapter Exceptions (OBP-6XXXX)
729-
// Reserved for adapter (south of Kafka) messages
730723
// Also used for connector == mapped, and show it as the Internal errors.
731724
val GetStatusException = "OBP-60001: Save Transaction Exception. "
732725
val GetChargeValueException = "OBP-60002: Get ChargeValue Exception. "

obp-api/src/main/scala/code/api/util/Glossary.scala

+10-165
Original file line numberDiff line numberDiff line change
@@ -129,10 +129,10 @@ object Glossary extends MdcLoggable {
129129
// NOTE! Some glossary items are defined in ExampleValue.scala
130130

131131

132-
val latestKafkaConnector : String = "kafka_vSept2018"
132+
val latestConnector : String = "rest_vMar2019"
133133

134134
def messageDocLink(process: String) : String = {
135-
s"""<a href="/message-docs?connector=$latestKafkaConnector#$process">$process</a>"""
135+
s"""<a href="/message-docs?connector=$latestConnector#$process">$process</a>"""
136136
}
137137

138138
val latestAkkaConnector : String = "akka_vDec2018"
@@ -171,8 +171,6 @@ object Glossary extends MdcLoggable {
171171
|
172172
|[Access Control](/glossary#API.Access-Control)
173173
|
174-
|[OBP Kafka](/glossary#Adapter.Kafka.Intro)
175-
|
176174
|[OBP Akka](/glossary#Adapter.Akka.Intro)
177175
|
178176
|[API Explorer](https://github.com/OpenBankProject/API-Explorer/blob/develop/README.md)
@@ -289,159 +287,6 @@ object Glossary extends MdcLoggable {
289287
|
290288
""")
291289

292-
293-
294-
glossaryItems += GlossaryItem(
295-
title = "Adapter.Kafka.Intro",
296-
description =
297-
s"""
298-
|## Use Kafka as an interface between OBP and your Core Banking System (CBS).
299-
|
300-
|
301-
|For an introduction to Kafka see [here](https://kafka.apache.org/)
302-
|
303-
|### Installation Prerequisites
304-
|
305-
|
306-
|* You have OBP-API running and it is connected to a Kafka installation.
307-
| You can check OBP -> Kafka connectivity using the <a href="/#OBPv3_1_0-getObpConnectorLoopback">"loopback" endpoint</a>.
308-
|
309-
|* Ideally you have API Explorer running (the application serving this page) but its not necessary - you could use any other REST client.
310-
|* You might want to also run API Manager as it makes it easier to grant yourself roles, but its not necessary - you could use the API Explorer / any REST client instead.
311-
|
312-
|### Create a Customer User and an Admin User
313-
|
314-
|* Register a User who will use the API as a Customer.
315-
|* Register another User that will use the API as an Admin. The Admin user will need some Roles. See [here](/index#OBPv2_0_0-addEntitlement). You can bootstrap an Admin user by editing the Props file. See the README for that.
316-
|
317-
|### Add some authentication context to the Customer User
318-
|
319-
|* As the Admin User, use the [Create Auth Context](/index#OBPv3_1_0-createUserAuthContext) endpoint to add one or more attributes to the Customer User.
320-
|For instance you could add the name/value pair CUSTOMER_NUMBER/889763 and this will be sent to the Adapter / CBS inside the AuthInfo object.
321-
|
322-
|
323-
|Now you should be able to use the [Get Auth Contexts](/index#OBPv3_1_0-getUserAuthContexts) endpoint to see the data you added.
324-
|
325-
|### Write or Build an Adapter to respond to the following messages.
326-
|
327-
| When getting started, we suggest that you implement the messages in the following order:
328-
|
329-
|1) Core (Prerequisites) - Get Adapter, Get Banks, Get Bank
330-
|
331-
|* ${messageDocLink("obp.getAdapterInfo")}
332-
|
333-
|Now you should be able to use the [Adapter Info](/index#OBPv3_1_0-getAdapterInfo) endpoint
334-
|
335-
|* ${messageDocLink("obp.getBanks")}
336-
|
337-
|Now you should be able to use the [Get Banks](/index#OBPv3_0_0-getBanks) endpoint
338-
|
339-
|* ${messageDocLink("obp.getBank")}
340-
|
341-
|Now you should be able to use the [Get Bank](/index#OBPv3_0_0-bankById) endpoint
342-
|
343-
|
344-
|2) Core (Authentications) -The step1 Apis are all anonymous access. If you need to link bank customer data to the obp user,
345-
| Then you need link OBP user with Bank user/customer using the [Create User Auth Context]((/index#OBPv3_1_0-createUserAuthContext)). Also
346-
| check the description for this endpoint. Once you create the user-auth-context for one user, then these user-auth-context key value pair
347-
| can be propagated over connector message. Than the Adapter can use it to map OBP user and Bank user/customer.
348-
|
349-
|* ${messageDocLink("obp.getBankAccountsForUser")}
350-
|
351-
|Now you should be able to use the [Refresh User](/index#OBPv3_1_0-refreshUser) endpoint
352-
|
353-
|3) Customers for logged in User
354-
|
355-
|* ${messageDocLink("obp.getCustomersByUserIdBox")}
356-
|
357-
|Now you should be able to use the [Get Customers](/index#OBPv3_0_0-getCustomersForUser) endpoint.
358-
|
359-
|
360-
|4) Get Accounts
361-
|
362-
|Now you should already be able to use the [Get Accounts at Bank (IDs only).](/index#OBPv3_0_0-getPrivateAccountIdsbyBankId) endpoint.
363-
|
364-
|* ${messageDocLink("obp.getCoreBankAccounts")}
365-
|
366-
| The above messages should enable at least the following endpoints:
367-
|
368-
|* [Get Accounts at Bank (Minimal).](/index#OBPv3_0_0-privateAccountsAtOneBank)
369-
|* [Get Accounts at all Banks (private)](/index#OBPv3_0_0-corePrivateAccountsAllBanks)
370-
|
371-
|5) Get Account
372-
|
373-
|* ${messageDocLink("obp.checkBankAccountExists")}
374-
|* ${messageDocLink("obp.getBankAccount")}
375-
|
376-
| The above message should enable at least the following endpoints:
377-
|
378-
|* [Get Account by Id - Core](/index#OBPv3_0_0-getCoreAccountById)
379-
|* [Get Account by Id - Full](/index#OBPv3_0_0-getPrivateAccountById)
380-
|
381-
|6) Get Transactions
382-
|
383-
|* ${messageDocLink("obp.getTransactions")}
384-
|* ${messageDocLink("obp.getTransaction")}
385-
|
386-
|7) Manage Counterparties
387-
|
388-
|* ${messageDocLink("obp.getCounterparties")}
389-
|* ${messageDocLink("obp.getCounterpartyByCounterpartyId")}
390-
|* ${messageDocLink("obp.createCounterparty")}
391-
|
392-
|8) Get Transaction Request Types
393-
|
394-
|* This is configured using OBP Props - No messages required
395-
|
396-
|9) Get Challenge Threshold (CBS)
397-
|
398-
|* ${messageDocLink("obp.getChallengeThreshold")}
399-
|
400-
|10) Make Payment (used by Create Transaction Request)
401-
|
402-
|* ${messageDocLink("obp.makePaymentv210")}
403-
|* This also requires 8,9,10 for high value payments.
404-
|
405-
|11) Get Transaction Requests.
406-
|
407-
|* ${messageDocLink("obp.getTransactionRequests210")}
408-
|
409-
|12) Generate Security Challenges (CBS)
410-
|
411-
|* ${messageDocLink("obp.createChallenge")}
412-
|
413-
|13) Answer Security Challenges (Validate)
414-
|
415-
|* Optional / Internal OBP (No additional messages required)
416-
|
417-
|14) Manage Counterparty Metadata
418-
|
419-
|* Internal OBP (No additional messages required)
420-
|
421-
|15) Get Entitlements
422-
|
423-
|* Internal OBP (No additional messages required)
424-
|
425-
|16) Manage Roles
426-
|
427-
|* Internal OBP (No additional messages required)
428-
|
429-
|17) Manage Entitlements
430-
|
431-
|* Internal OBP (No additional messages required)
432-
|
433-
|18) Manage Views
434-
|
435-
|* Internal OBP (No additional messages required)
436-
|
437-
|19) Manage Transaction Metadata
438-
|
439-
|* Internal OBP (No additional messages required)
440-
|
441-
|"""
442-
)
443-
444-
445290
glossaryItems += GlossaryItem(
446291
title = "Adapter.Stored_Procedure.Intro",
447292
description =
@@ -488,14 +333,14 @@ object Glossary extends MdcLoggable {
488333
|
489334
|However, there are multiple available connector implementations - and you can also mix and create your own.|
490335
|
491-
|E.g. Kafka
336+
|E.g. RabbitMq
492337
|
493338
|<pre>
494339
|[=============] [============] [============] [============] [============]
495340
|[ ] [ ] [ ] [ ] [ ]
496-
|[ OBP API ] ===> Kafka Connector ===> [ Kafka ] ===> [ Kafka ] [ OBP Kafka ] ===> [ CBS ]
341+
|[ OBP API ] ===> RabbitMq Connector ===> [ RabbitMq ] ===> [ RabbitMq ] [ OBP RabbitMq] ===> [ CBS ]
497342
|[ ] Puts OBP Messages [ Connector ] [ Cluster ] [ Adapter ] [ ]
498-
|[=============] onto a Kafka [============] [============] [============] [============]
343+
|[=============] onto a RabbitMq [============] [============] [============] [============]
499344
|
500345
|</pre>
501346
|
@@ -691,7 +536,7 @@ object Glossary extends MdcLoggable {
691536
|It SHOULD be a UUID. It MUST be unique in combination with the BANK_ID. ACCOUNT_ID is used in many URLS so it should be considered public.
692537
|(We do NOT use account number in URLs since URLs are cached and logged all over the internet.)
693538
|In local / sandbox mode, ACCOUNT_ID is generated as a UUID and stored in the database.
694-
|In non sandbox modes (Kafka etc.), ACCOUNT_ID is mapped to core banking account numbers / identifiers at the South Side Adapter level.
539+
|In non sandbox modes (RabbitMq etc.), ACCOUNT_ID is mapped to core banking account numbers / identifiers at the South Side Adapter level.
695540
|ACCOUNT_ID is used to link Metadata and Views so it must be persistant and known to the North Side (OBP-API).
696541
|
697542
| Example value: ${accountIdExample.value}
@@ -3172,7 +3017,7 @@ object Glossary extends MdcLoggable {
31723017
|
31733018
|The OBP Connector is a core part of the OBP-API and is written in Scala / Java and potentially other JVM languages.
31743019
|
3175-
|The OBP Connector implements multiple functions / methods in a style that satisfies a particular transport / protocol such as HTTP REST, Akka or Kafka.
3020+
|The OBP Connector implements multiple functions / methods in a style that satisfies a particular transport / protocol such as HTTP REST, Akka or RabbitMq.
31763021
|
31773022
|An OBP Adapter is a separate software component written in any programming language that responds to requests from the OBP Connector.
31783023
|
@@ -3193,7 +3038,7 @@ object Glossary extends MdcLoggable {
31933038
| 1) The Name of the internal OBP function / method e.g. getAccountsForUser
31943039
| 2) The Outbound Message structure.
31953040
| 3) The Inbound Message structure.
3196-
| 4) The Connector name which denotes the protocol / transport used (e.g. REST, Akka, Kafka etc)
3041+
| 4) The Connector name which denotes the protocol / transport used (e.g. REST, Akka, RabbitMq etc)
31973042
| 5) Outbound / Inbound Topic
31983043
| 6) A list of required Inbound fields
31993044
| 7) A list of dependent endpoints.
@@ -3233,7 +3078,7 @@ object Glossary extends MdcLoggable {
32333078
|This contains the named fields and their values which are specific to each Function / Message Doc.
32343079
|
32353080
|
3236-
|The Outbound / Inbound Topics are used for routing in multi OBP instance / Kafka installations. (so OBP nodes only listen only to the correct Topics).
3081+
|The Outbound / Inbound Topics are used for routing in multi OBP instance / RabbitMq installations. (so OBP nodes only listen only to the correct Topics).
32373082
|
32383083
|The dependent endpoints are listed to facilitate navigation in the API Explorer so integrators can test endpoints during integration.
32393084
|
@@ -3247,7 +3092,7 @@ object Glossary extends MdcLoggable {
32473092
s"""
32483093
|
32493094
| Open Bank Project can have different connectors, to connect difference data sources.
3250-
| We support several sources at the moment, eg: databases, rest services, stored procedures and kafka.
3095+
| We support several sources at the moment, eg: databases, rest services, stored procedures and RabbitMq.
32513096
|
32523097
| If OBP set connector=star, then you can use this method routing to switch the sources.
32533098
| And we also provide the fields mapping in side the endpoints. If the fields in the source are different from connector,

obp-api/src/main/scala/code/api/util/NewStyle.scala

+1-1
Original file line numberDiff line numberDiff line change
@@ -1371,7 +1371,7 @@ object NewStyle extends MdcLoggable{
13711371

13721372
def getTransactionRequestImpl(transactionRequestId: TransactionRequestId, callContext: Option[CallContext]): OBPReturnType[TransactionRequest] =
13731373
{
1374-
//Note: this method is not over kafka yet, so use Future here.
1374+
//Note: this method is not over CBS yet, so use Future here.
13751375
Future{ Connector.connector.vend.getTransactionRequestImpl(transactionRequestId, callContext)} map {
13761376
unboxFullOrFail(_, callContext, s"$InvalidTransactionRequestId Current TransactionRequestId($transactionRequestId) ")
13771377
}

obp-api/src/main/scala/code/api/util/WriteMetricUtil.scala

+1-1
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ object WriteMetricUtil extends MdcLoggable {
135135
Empty
136136
}
137137

138-
// TODO This should use Elastic Search or Kafka not an RDBMS
138+
// TODO This should use Elastic Search not an RDBMS
139139
val u: User = user.orNull
140140
val userId = if (u != null) u.userId else "null"
141141
val userName = if (u != null) u.name else "null"

obp-api/src/main/scala/code/api/v2_2_0/APIMethods220.scala

+3-3
Original file line numberDiff line numberDiff line change
@@ -438,12 +438,12 @@ trait APIMethods220 {
438438
"GET",
439439
"/message-docs/CONNECTOR",
440440
"Get Message Docs",
441-
"""These message docs provide example messages sent by OBP to the (Kafka) message queue for processing by the Core Banking / Payment system Adapter - together with an example expected response and possible error codes.
441+
"""These message docs provide example messages sent by OBP to the (RabbitMq) message queue for processing by the Core Banking / Payment system Adapter - together with an example expected response and possible error codes.
442442
| Integrators can use these messages to build Adapters that provide core banking services to OBP.
443443
|
444444
| Note: API Explorer provides a Message Docs page where these messages are displayed.
445445
|
446-
| `CONNECTOR`: kafka_vSept2018, stored_procedure_vDec2019 ...
446+
| `CONNECTOR`: rest_vMar2019, stored_procedure_vDec2019 ...
447447
""".stripMargin,
448448
EmptyBody,
449449
messageDocsJson,
@@ -457,7 +457,7 @@ trait APIMethods220 {
457457
implicit val ec = EndpointContext(Some(cc))
458458
for {
459459
connectorObject <- Future(tryo{Connector.getConnectorInstance(connector)}) map { i =>
460-
val msg = s"$InvalidConnector Current Input is $connector. It should be eg: kafka_vSept2018..."
460+
val msg = s"$InvalidConnector Current Input is $connector. It should be eg: rest_vMar2019..."
461461
unboxFullOrFail(i, cc.callContext, msg)
462462
}
463463
} yield {

obp-api/src/main/scala/code/api/v3_1_0/APIMethods310.scala

+1-5
Original file line numberDiff line numberDiff line change
@@ -1880,11 +1880,7 @@ trait APIMethods310 {
18801880
(_, callContext) <- anonymousAccess(cc)
18811881
connectorVersion = APIUtil.getPropsValue("connector").openOrThrowException("connector props field `connector` not set")
18821882
starConnectorProps = APIUtil.getPropsValue("starConnector_supported_types").openOr("notfound")
1883-
// obpApiLoopback <- connectorVersion.contains(connectorVersion.contains("star")) match {
1884-
// case false => throw new IllegalStateException(s"${NotImplemented}for connector ${connectorVersion}")
1885-
// case _ => throw new IllegalStateException(s"${KafkaServerUnavailable} Timeout error, because kafka do not return message to OBP-API. ${e.getMessage}")
1886-
// }
1887-
//TODO, before we only support kafka, now we need to decide what kind of connector should we use.
1883+
//TODO we need to decide what kind of connector should we use.
18881884
obpApiLoopback = ObpApiLoopback(
18891885
connectorVersion ="Unknown",
18901886
gitCommit ="Unknown",

obp-api/src/main/scala/code/api/v4_0_0/APIMethods400.scala

+1-1
Original file line numberDiff line numberDiff line change
@@ -1043,7 +1043,7 @@ trait APIMethods400 extends MdcLoggable {
10431043
|4) `answer` : must be `123` in case that Strong Customer Authentication method for OTP challenge is dummy.
10441044
| For instance: SANDBOX_TAN_OTP_INSTRUCTION_TRANSPORT=dummy
10451045
| Possible values are dummy,email and sms
1046-
| In kafka mode, the answer can be got by phone message or other SCA methods.
1046+
| In CBS mode, the answer can be got by phone message or other SCA methods.
10471047
|
10481048
|Note that each Transaction Request Type can have its own OTP_INSTRUCTION_TRANSPORT method.
10491049
|OTP_INSTRUCTION_TRANSPORT methods are set in Props. See sample.props.template for instructions.

0 commit comments

Comments
 (0)