Skip to content

Commit 1f02c9f

Browse files
committed
https://telecominfraproject.atlassian.net/browse/WIFI-13450
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
1 parent 7ba9b43 commit 1f02c9f

5 files changed

Lines changed: 18 additions & 4 deletions

File tree

build

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
6
1+
7

src/RESTObjects/RESTAPI_ProvObjects.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -587,6 +587,9 @@ namespace OpenWifi::ProvObjects {
587587
field_to_json(Obj, "locale", locale);
588588
field_to_json(Obj, "realMacAddress", realMacAddress);
589589
field_to_json(Obj, "doNotAllowOverrides", doNotAllowOverrides);
590+
field_to_json(Obj, "imported", imported);
591+
field_to_json(Obj, "connected", connected);
592+
field_to_json(Obj, "platform", platform);
590593
}
591594

592595
bool InventoryTag::from_json(const Poco::JSON::Object::Ptr &Obj) {
@@ -609,6 +612,9 @@ namespace OpenWifi::ProvObjects {
609612
field_from_json(Obj, "locale", locale);
610613
field_from_json(Obj, "realMacAddress", realMacAddress);
611614
field_from_json(Obj, "doNotAllowOverrides", doNotAllowOverrides);
615+
field_from_json(Obj, "imported", imported);
616+
field_from_json(Obj, "connected", connected);
617+
field_from_json(Obj, "platform", platform);
612618
return true;
613619
} catch (...) {
614620
}

src/RESTObjects/RESTAPI_ProvObjects.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -490,9 +490,11 @@ namespace OpenWifi::ProvObjects {
490490
std::string locale;
491491
std::string realMacAddress;
492492
bool doNotAllowOverrides = false;
493+
std::uint64_t imported=0;
494+
std::uint64_t connected=0;
495+
std::string platform{"AP"};
493496

494497
void to_json(Poco::JSON::Object &Obj) const;
495-
496498
bool from_json(const Poco::JSON::Object::Ptr &Obj);
497499
};
498500

src/framework/KafkaManager.cpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,10 @@ namespace OpenWifi {
7979
Utils::SetThreadName("Kafka:Prod");
8080
cppkafka::Configuration Config(
8181
{{"client.id", MicroServiceConfigGetString("openwifi.kafka.client.id", "")},
82-
{"metadata.broker.list",
83-
MicroServiceConfigGetString("openwifi.kafka.brokerlist", "")}});
82+
{"metadata.broker.list",MicroServiceConfigGetString("openwifi.kafka.brokerlist", "")} // ,
83+
// {"send.buffer.bytes", KafkaManager()->KafkaManagerMaximumPayloadSize() }
84+
}
85+
);
8486

8587
AddKafkaSecurity(Config);
8688

@@ -275,6 +277,7 @@ namespace OpenWifi {
275277
int KafkaManager::Start() {
276278
if (!KafkaEnabled_)
277279
return 0;
280+
MaxPayloadSize_ = MicroServiceConfigGetInt("openwifi.kafka.max.payload", 250000);
278281
ConsumerThr_.Start();
279282
ProducerThr_.Start();
280283
return 0;

src/framework/KafkaManager.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,11 +94,14 @@ namespace OpenWifi {
9494
return ConsumerThr_.UnregisterTopicWatcher(Topic,Id);
9595
}
9696

97+
std::uint64_t KafkaManagerMaximumPayloadSize() const { return MaxPayloadSize_; }
98+
9799
private:
98100
bool KafkaEnabled_ = false;
99101
std::string SystemInfoWrapper_;
100102
KafkaProducer ProducerThr_;
101103
KafkaConsumer ConsumerThr_;
104+
std::uint64_t MaxPayloadSize_ = 250000;
102105

103106
void PartitionAssignment(const cppkafka::TopicPartitionList &partitions);
104107
void PartitionRevocation(const cppkafka::TopicPartitionList &partitions);

0 commit comments

Comments
 (0)